|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Some clarificatiosn -- RE: [Question] How to do incremental parsing?
Mousheng Xu writes: <snip> An incremental SAX parser such as the suggested MSXML SAX parser seems to be the closest idea, but an incremental DOM parser has to be built upon it. Ajay, do you have a quick reference on MSXML? Mousheng, As for quick reference on MSXML, 1. We have never used DOM. 2. We use both MSXML SAX parser and writer. 3. For parsing we use: a. ISAXXMLReader for Parse()ing. b. IMXReaderControl for Suspend(), Resume() and Abort() c. Class derrived from ISAXContentHandler for registering our own content handler for SAX Events (startDocument(), endDocument(), startElement(), endElement(), characters() etc) d. Class derrived from ISAXErrorHandler to catch error situations e. Initialise ISAXXMLReader with your own ISAXContentHandler and ISAXErrorHandler interfaces f. Initiate Parse()ing and catch events g. Suspend() (probably in one of the ISAXContentHandler events) and Abort() (probably in one of the ISAXErrorHandler event) in one the catch'ed events and Resume() when ready for parsing again 4. Writing is even simpler as far as the interfaces are concerned but placing end-tags can be a bit tricky depending on nestedness of your structure. I think if you use DOM, you don't have to worry about writing the start/end-tags but I guess you do have to worry about the memory constraints. I am not sure if you can create small DOM-lets and "append" to the same file, one tree-node structure at a time. Hope this helps. Thank you, Ajay
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








