Re: Pull parsing with Expat?

Karl Waclawek <[email protected]>
Newsgroups gmane.text.xml.expat.general
Message-ID <[email protected]>
Jonathan Claggett wrote:
> Hello,
>
> I'm looking to use Expat for parsing XML files (because it's fast and
> competent) but not via the standard callbacks. Instead, I want to loop
> through an input file by repeatedly calling an Expat function that returns
> the next XML token and its type from the input file. Ideally, there would be
> an XML_ParseNextToken() (or maybe the XmlTok macros?) function or something
> like that. I believe this kind of processing is known as 'pull' parsing
> since the application explicitly requests the next token to be handled.
> Anyway, is this kind of usage something Expat is suited for or can even
> handle?
>
>   
Not directly. You would have to write a Pull layer with internal
call-back handlers on top of Expat using XML_ParserStop in each handler.

Karl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.