views:

37

answers:

2

Hi

I'm trying to use SemWeb library to make my SPARQL queries on an remote SPARQL endpoint.

this is what i'm using fort testing, since this is an example that came with Semweb

SparqlHttpSource source = new SparqlHttpSource("my_endpoint");

source.RunSparqlQuery("SELECT * WHERE {?entity dcterms:title 'someentity' }", new SparqlXmlQuerySink(Console.Out));

Now, what happens is that my query isn't returning xml, but javascript, how do i know that? using this simpler example:

SparqlHttpSource source = new SparqlHttpSource("my_endpoint");

source.RunSparqlQuery("SELECT * WHERE {?entity dcterms:title 'someentity' }", Console.Out);

So my question is, how do i tell semweb to get my results in xml format?

Thanks

A: 

Have a look at your endpoint configuration, there are various ways that endpoints decide what output to give.

Alternitavly you could just serialize the json output and use that.

Jeremy French
hi, can you show me an example?i know my endpoint is on a virtuoso server, does it help? i'm new on this so i'm searching for a little guidanceThanks
Elias
I am afriad I don't know the SparqlHttpSource object, there should be soome info in the docs.
Jeremy French
+1  A: 

Thanks for trying to help me

I found the answer, simply my endpoint address was wrong, now it's working

i forgot to mention /sparql at the of my URL.

Elias