  
(An excerpt from XML Programming with VB and ASP)

This manuscript is an abridged version of a chapter from the Manning Publications book
XML Programming with VB and ASP. This chapter looks at the Microsoft DOM object in quite some detail.
XML Programming with VB and ASP gives a VB/ASP developer a from-the-ground-up start to XML and XML programming in VB and ASP. Fun to read and easy going, this is a no-frills book which gets right to the point. More advanced topics include BizTalk, schemas, webclasses and XSL.
What this chapter of the book covers:
- Descriptions of the Microsoft XML objects
- Sample code for most of the methods and properties
- Easy-reference table guide to the objects
Overview
Microsoft has shipped some very useful objects with IE5 that can be used from any programming language that can make use of COM objects. In this part of the book, we will focus on the XML DOM objects using VB or VBScript.
To better understand code or descriptions of the DOMDocument, try to think of an XML document as a tree. Another useful analogy is to think of parents and their children.
To better understand code or descriptions about the DOM, try to think of an XML document as a tree. Another useful analogy is to think of parents and their children. We start with the actual root of the document, then it meanders down to each processing instruction, the document root element, attributes, etc. These objects in the DOM are known by there own type (e.g., Element, Attribute, etc.), but each type is generally called a Node. The DOM gives us collections objects as well, known as NodeLists when a parent has many children that need to be grouped. Figure describes how the tree structure is implemented:
This chapter, while comprehensive, should not be used as a complete reference.
The XML DOM Object implements the XML DOM interfaces. These interfaces make reusability throughout the DOM practical. Because these two objects share the same interfaces, the code becomes easier to understand and work with, which we will see in a short while.
This manuscript is an abridged version of a chapter from the Manning Publications book XML
Programming with VB and ASP. This chapter looks at the Microsoft DOM objects. NOTE: Most images have been removed to increase speed and many of the code comments have also been removed for presentation. Please purchase the book to enjoy the full experience of all the chapters with images and code comments!
|