Convert DOM to SAX
With MSXML, 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 the DOMDocument
object, SAXXMLReader
can parse objects based on IXMLDOMNode
, or any interface that inherits from it.