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/24/2008
Times viewed :
1004
XML DOM objects
First we need to explain the various, common DOM objects that
you will use with the MSXML DOM Object.
We will focus on the examples of these XML DOM objects shown
in table:
Object name
Description
DOMDocument
This object represents the root of the XML file.
XML DOM Element
This object represents each element in the DOM- Document,
namely the root, root element, and each other element.
XML DOM Node
This object represents a single Node in the document tree and
includes support for data types, namespaces, DTDs, and XML Schemas.
XML DOM NodeList
Use this object to access (by name) and iterate through the
XMLDOMNode collection.
XML DOM NamedNodeMap
Use this object to access and iterate through the attributes
in an element.
XML DOM CDATASection
This object represents a section in the value of an ele ment
that is closed in the CDATA section brackets, which are
characters that cannot be parsed by the XML.
XML DOM Attribute
This object represents a single attribute Node for a given
element.
XML DOM DocumentType
This object represents the Document Type (DTD) in an XML
file.
XML DOM Entity
This object represents an entity in the DTD section of the XML
file.
XML DOM ProcessingInstruction
This object represents a processing instruction found in the
XML file.
XML DOM ParseError
This object returns detailed information about the last error,
including the line number, character position, and a text
description.
XMLHTTPRequest
This object enables you to establish a connection to a web
server from your code and send put, get, and other standard HTML
requests.
In our examples, we will refer to these objects using the
names listed in table .
0.0.1 XML object naming conventions
XML object interface
Our naming convention
DOMDocument
objDOMDocument
XML DOM Node
objXMLDOMNode
XML DOM NodeList
objXMLDOMNodeList
XML DOM NodeListMap
objXMLDOMNodeListMap
XML DOM ParseError
objXMLDOMParseError
XML DOM Element
objXMLDOMElement
XML DOM Attribute
objXMLDOMAttribute
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!