Convert DOM to SAX
With MSXML 5.0, you can use SAX and DOM interchangeably. For example, a process might pass your application a DOMDocument
or an IXMLDOMNode
object. However, you might want the flexibility of using the SAX writer to produce the resulting XML for your application. In this situation, your application would require SAX input, not DOM input. Therefore, you might choose to perform DOM-to-SAX conversion.
This topic provides an example that shows how you do this by parsing a DOMDocument
object with SAX events.
Note Besides theDOMDocument
object,SAXXMLReader
can parse objects based onIXMLDOMNode
, or any interface that inherits from it.