QueryPathParseException:Premature end of data in tag

41 views
Skip to first unread message

Jeremy Peng

unread,
Jul 16, 2013, 11:57:57 PM7/16/13
to support-...@googlegroups.com
Im using example/sparql.php to write a drupal module.

And i getting this error when trying to send a sparql query to the sparql endpoint:

QueryPathParseException:DOMDocument::load(): Premature end of data in tag body line 40 in http://rayhsu-pc:8080/LMF/sparql/admin/snorql/snorql.html?query=++++%0D%0A++++SELECT+%3Furi+%3Flabel%0D%0A++++WHERE+%7B++++++%0D%0A++++++%3Furi+rdfs%3Alabel+%3Flabel.%0D%0A++++++FILTER+%28%3Flabel+%3D+%27Discovery+Center+of+Taipei%27%29.++++++%0D%0A++++%7D%0D%0A++, line: 589 (C:\Users\Fong\Downloads\TWAMPd\htdocs\drupal-7.15\sites\all\modules\querypath\QueryPath\QueryPath.php: 2002) 於QueryPathParseException::initializeFromError()(C:\Users\Fong\Downloads\TWAMPd\htdocs\drupal-7.15\sites\all\modules\querypath\QueryPath\QueryPath.php 中的第 2242 行)。

how to avoid this exception?

THX

TechnoSophos

unread,
Jul 17, 2013, 2:23:14 PM7/17/13
to support-...@googlegroups.com
I'd have to see the XML that is being parsed. Can you get that?


--
You received this message because you are subscribed to the Google Groups "support-querypath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to support-queryp...@googlegroups.com.
To post to this group, send email to support-...@googlegroups.com.
Visit this group at http://groups.google.com/group/support-querypath.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
http://technosophos.com
http://querypath.org

Jeremy Peng

unread,
Jul 18, 2013, 3:56:22 AM7/18/13
to support-...@googlegroups.com
it's work now.

when i change sparql endpoint from http://dbpedia.org/snorql to http://dbpedia.org/sparql

but i don't understand what's different between about those two?

Matt於 2013年7月18日星期四UTC+8上午2時23分14秒寫道:

TechnoSophos

unread,
Jul 18, 2013, 10:31:08 AM7/18/13
to support-...@googlegroups.com
The error you got indicates that you received malformed XML or HTML from a request. What I am guessing (based on the error) is that you got HTML5 output when the parser was expecting strict XML. When you switched endpoints, it probably switched to XML.

Sometimes working directly with the Accept headers for the HTTP request can fix things. But if you have it working now, you are probably safe to leave it.


Matt

Jeremy Peng

unread,
Jul 18, 2013, 11:55:26 AM7/18/13
to support-...@googlegroups.com
thx Matt

you've been a great help.

Matt於 2013年7月18日星期四UTC+8下午10時31分08秒寫道:
Reply all
Reply to author
Forward
0 new messages