Microsoft HomeproductssearchsupportshopWrite Us   Microsoft Home
Magazine
 |  Community
 |  Workshop
 |  Tools & Samples
 |  Training
 |  Site Info

Workshop  |  XML (Extensible Markup Language)

IDOMDocument Object


The IDOMDocument object represents the top node of the tree.

Remarks

The IDOMDocument object represents the top node in the XML document tree. This object exposes all the properties and methods of the IDOMNode object and provides additional methods and properties specific to the document node type.

Don't confuse this object with the "DOMDocument" object that is created using the identifier "Microsoft.XMLDOM". The "DOMDocument" object represents the IXMLDOMDocument object.

In addition to the DOM interfaces, IDOMDocument implements a number of standard OLE interfaces: IPersistStreamInit, IPersistMoniker, IObjectSafety, IObjectWithSite, IOleCommandTarget, IMarshal, and IConnectionPointContainer.

When object-creation methods (such as createElement) are used on the document, nodes are created in the context of the document (the ownerDocument property of the node points to the document) but the node is not part of the document tree. The node is only part of the document tree when it is explicitly added to the tree by calling insertBefore, replaceChild, or appendChild (or, for attributes, setAttributeNode).

White Space Within Your XML Document

Within a mixed content model (a content model that allows both elements and text nodes), XML considers white space to be significant and preserves all white space characters (such as the space, tab, and line-feed characters). When white space separates two different elements, the XML Document Object Model (DOM) tree representation includes the two element nodes and a text node that contains the separating white space.

In other content models, however, the XML DOM collapses white space. To override the default and preserve white space, you must specify the following attribute at the point within the document tree above the text you want to preserve:

xml:space="preserve" 

For example, to preserve white space in the mytag element and all its child elements, use the following XML:

<mytag xml:space="preserve">
...
</mytag>

Members

See Also

IXMLDOMDocument


Does this content meet your programming needs? Write us!

Back to topBack to top

© 1998 Microsoft Corporation. All rights reserved. Terms of use.

 

Magazine Home
Ask Jane
DHTML Dude
Extreme XML
For Starters
More or Hess
Servin' It Up
Site Lights
Web Men Talking
Member Community Home
Benefits: Freebies & Discounts
Benefits: Promote Your Site
Benefits: Connect with Your Peers
Benefits at a Glance
Online Special-Interest Groups
Your Membership
SBN Stores
Join Now
Workshop Home
Essentials
Content & Component Delivery
Component Development
Data Access & Databases
Design
DHTML, HTML & CSS
Extensible Markup Language (XML)
Languages & Development Tools
Messaging & Collaboration
Networking, Protocols & Data Formats
Reusing Browser Technology
Security & Cryptography
Server Technologies
Streaming & Interactive Media
Web Content Management
Workshop Index
Tools & Samples Home
Tools
Samples, Headers, Libs
Images
Sounds
Style Sheets
Web Fonts
Training Home
SBN Live Seminars
SBN Live Chats
Courses
Peer Support
CD-ROM Training
Books & Training Kits
Certification
SBN Home
New to SBN?
What's New on SBN
Site Map
Site Search
Glossary
Write Us
About This Site