How to parse a remote Internet XML document via 'Libxml2'

J

jacob navia

Francesco said:
Hi.

I would like to parse a remote Internet XML document
(http://www.foo.com/foo.xml) by using 'Libxml2'
(http://www.xmlsoft.org/).

I created a program to parse a local document, but
I'm unable to parse this remote doc.

$ my_program foo.xml --->OK
$ my_program http://www.foo.com/foo.xml ---> DOES NOT WORK

Any suggestion?

Thank you very much.

Hi Francesco

You have to add some logic for retrieving the file from the
internet isn't it?
 
J

Joona I Palaste

Using the lcc-win32 compiler you can write:

Other compilers or libraries may have different functions
for doing that.

And please note that neither geturl() nor any other such function any
other compiler or library might provide is specified by the ANSI/ISO C
standard, so technically they're off-topic here.
Jacob, I suggest you mention this every time you advertise some fancy
feature in your glorious lcc-win32 compiler. It's a fine product, I'm
sure, and you're a better programmer than I'll ever be, but this
newsgroup is about C, not about lcc-win32.
 
M

Michael Wojcik

Is there any way in C to fetch a URL and get their content?

Not in C, no. However, there are a great many facilities for doing
that which can be called by C programs written using various C
implementations.

Anything further is implementation-dependent and/or platform-dependent,
and off-topic for comp.lang.c.

Off-topic: libxml2 includes minimal HTTP and FTP client implementa-
tions, according to the documentation. The facilities you need are
in the library you're already using.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top