Mayfair
Mayfair

Reputation: 647

dotnetRDF AllegroGraphConnector XML error when querying

Code


AllegroGraphConnector connector = new AllegroGraphConnector(
    "https://someid.allegrograph.cloud/",
    "root",
    "mystore");

string sparqlQuery = @"ASK { ?s ?p ?o }";

var result = connector.Query(sparqlQuery); // This lines throws error

The problem


When using any well-formed query, I get the following error:

Version number '1.1' is invalid. Line 1, position 16.

Full error (as image): image of error in LINQPad 8


What have I tried?


Querying the store on the AllegroGraph web view does work (the above SPARQL query should simply return 'true'. I suspect the problem is any of the following:

Software


Update


When doing the same SPARQL query with only HttpClient using ?query I get the following result:

<?xml version="1.1"?>
<!-- Generated by AllegroGraph 8.2.1 -->
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
  <head/>
  <boolean>true</boolean>
</sparql>

The error therefore relates to the XML version 1.1 returned by the AllegroGraph server. It seems AllegroGraphConnector doesn't support parsing XML 1.1.

Finally


Thank you in advance for answering/commenting. Any help is welcome.

Please keep in mind that I am new to the Semantics Web world and thus new to AllegroGraph, dotnetRDF, SPARQL, etc.

Upvotes: 0

Views: 40

Answers (0)

Related Questions