Processing XML with MSXML

MSXML supports two basic APIs for processing XML: DOM and SAX (the Simple API for XML). Let's start with DOM.


As I've mentioned, the DOM method involves parsing an XML document and loading it into a tree structure in memory. An XML document parsed via DOM is known as a DOM document (or just DOM, for short). Listing 8.9 presents a simple VB application that demonstrates parsing an XML document via DOM and querying it for a particular node set. (You can find the source code for this app in the CH08\domltest subfolder on the CD accompanying this book.)

Listing 8.9. A VB App That Processes an XML Document via DOM
 Private Sub Command1_Click() Dim bstrDoc As String bstrDoc = "<Songs> " & _ "<Song title='One ...

Get Guru's Guide to SQL Server Architecture and Internals, The now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.