Re: [xml] Reading a file over network

Sorry, i've been misleading.

In the documentation (for example in there are several 
functions that accepts an URL, giving me the idea that libxml can handle local 
or remote files (through FTP or HTTP) trasparently.

I'd like to create a SAX parser in push mode with the same facility, but I can't
do this using "fread". I know I should open a socket, read from it etc... but I 
was wondering if there is already some function able to do this in libxml2.

Thanks again,

On Mon, 30 Oct 2006, Daniel Veillard wrote:

Date: Mon, 30 Oct 2006 03:14:42 -0500
From: Daniel Veillard <veillard redhat com>
To: "Giorgio Calderone <gcalderone neomedia it>" <gcalderone neomedia it>
Cc: xml gnome org
Subject: Re: [xml] Reading a file over network

On Mon, Oct 30, 2006 at 01:30:22AM +0100, Giorgio Calderone <gcalderone neomedia it> wrote:
I'm trying to write an XML parser using the SAX interface with the push method. 
My code looks like this:

  f = fopen(filename, "r");
  ctxt = xmlCreatePushParserCtxt(mySAXHandler, ...);

  while (fread(...))

And it work with local files, but how can I read a file over the network ? 
Maybe I should use xmlParserInputBuffer or something else ? 

  It seems your question is how to read data from 'the network' and
that is really not related to libxml2. Once you get the bits you push them
in tyhe exact same way to libxml2.
  Now how you get your data completely depends what service you need to
address and seems out of the scope of this mailing list.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]