http_open
Josef Frydl <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
I used it for more complex queries, but could not process result correctly, so I reverse to example in the manual and issue this query:
open('/Users/joseffrydl/Desktop/swihref1.txt', write, S),
http_open('http://www.google.com/search?q=prolog', In, []),
load_html(In, DOM, []),
findall(Link, xpath(DOM, //a(@href), Link),Links),write(S,Links).
I gor errors and warnings:
ERROR: SGML2PL(sgml): http://www.google.com/search?q=prolog:1: entity "tab" does not exist
ERROR: SGML2PL(sgml): http://www.google.com/search?q=prolog:1: entity "um" does not exist
and much more
Warning: SGML2PL(sgml): http://www.google.com/search?q=prolog:1: Element "style" not allowed here
Warning: SGML2PL(sgml): http://www.google.com/search?q=prolog:1: Element "a" not allowed here
Warning: SGML2PL(sgml): http://www.google.com/search?q=prolog:1: Element "a" not allowed here
Warning: SGML2PL(sgml): http://www.google.com/search?q=prolog:1: Element "a" not allowed here
Warning: SGML2PL(sgml): http://www.google.com/search?q=prolog:1: Incomplete element: <u>
Warning: SGML2PL(sgml): http://www.google.com/search?q=prolog:1: Incomplete element: <u>
And example of results
http://www.swi-prolog.org/%252Bprolog&sa=U&ei=4JAWUuGnHYGwiQK6uYCQDQ&ved=0CCIQIDAB&usg=AFQjCNFqeTeplrJLairAJO3pca_tdBoyzw,/search?lr=&hl=en&as_qdr=all&ie=UTF-8&q=related:www.swi-prolog.org/+prolog&tbo=1&sa=X&ei=4JAWUuGnHYGwiQK6uYCQDQ&ved=0CCMQHzAB,/url?q=
the whole file is in attachment.
My questions are these, how to suppress these errors and wrnings and can I get the result which then be used for opening te sites with other http_open, that is more important then errors
Thanks Josef Frydl
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: swihref1w.txt
URL: <https://lists.iai.uni-bonn.de/pipermail/swi-prolog/attachments/20130822/74b246b7/attachment.txt>