Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT
  Features
      Ask DevGuru
      ASP Resources
      HTML Color Chart
      Find the Bug
      Knowledge Base
      Links
      Tips of the Week
      T-SQL Syntax Charts
      Tutorials
  Products
      dgCalendar
      dgCharge
      dgChart
      dgEncrypt
      dgFileUpload
      dgReport
      dgSort
      dgTree
  Site
      Authoring
      Coming Soon
      DevGuru Resume
      Errata
      Link to Us
      Merchandise
      Sponsorships
      Testimonials
      What's New
  Partners
      Code Project
      DevelopersDex
      Prog. Heaven
      Tek-Tips Forum
      TopXML
      VBXML.COM
      VisualBuilder.com
      W3Schools
      XMLPitstop
      ZVON.org
      Search Us!

       











PROPERTY:  Node::ownerDocument

Node.ownerDocument

The ownerDocument property returns the Document object to which the node belongs. If the node itself is a document, then it returns null.

To illustrate this, the following example gets the parent document of the root node of the 'states.xml' file, and displays its nodeName.

Code (VBScript):
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
objXMLDoc.load("states.xml")

Dim objNode
Set objNode = objXMLDoc.documentElement.ownerDocument
document.write(objNode.nodeName)

Output:
#document





Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information