Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :
03/19/2008
Times viewed :
8873
XML DOM Reference
Play the DOM game
Learn by playing the "Understanding
the XML DOM" game. Read about the XML DOM and then
answer the questions. See if you can get a 100% score and if
not, play it again.
Microsoft has shipped some very useful objects with IE 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 XMLProgramming 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!