[xml] xml reader interface and sockets



Hi,

 From what I've read of the new xml reader interface, it's only lets you
pull in the parsed data.  It doesn't let you push in the raw xml.  I'm
working on a project that involves reading large amounts of XML from a
socket, and I thought it might be a lot more efficient to be able to
hand chunks to the parser.  Something like:

  While (Data Available)
    Push XML Chunk
    While (Nodes to Parse)
      Handle Node
  Close XML Input
  Handle Remaining Nodes

I'm current using Expat and it's sax-ish interface; however, that's
turning out to be complete hell (since I need to parse the data into a
tree form, but one that doesn't mirror the XML format, so I have tons
and tons of state to track and such; doesn't help that Expat doesn't
validate or allow error codes in the callbacks...)

Anyways, the point of this babbling, will it be possible to feed chunks
to the XML Reader interface?  If not, does libxml2 offer another
interface besides SAX that might fit?


-- 
Sean Middleditch <elanthis awesomeplay com>
AwesomePlay Productions, Inc.




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