Re: expat parsing destructively?
Boris Kolpackov <[email protected]> Wed, 14 Nov 2007 07:36:27 +0000 (UTC)
| Newsgroups | gmane.text.xml.expat.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Mohun, Mohun Biswas <[email protected]> writes: > I still say it would be really great if expat had an optional > destructive-parsing mode. For one thing it seems in keeping with the > spirit of SAX where you chew through the data once linearly and never > look back (except with your own state variables of course). One obvious problem with this approach is that the attribute values can contain entity references (e.g., &, etc) that need to be expanded. I suppose the parser could replace them in the original buffer and zap the gap by moving the rest of the value forward but, as you can see, it gets really messy. Boris -- Boris Kolpackov Code Synthesis Tools CC http://www.codesynthesis.com Open-Source, Cross-Platform C++ XML Data Binding