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

Workshop  |  XML (Extensible Markup Language)

parentNode Property


Contains the parent node (for nodes that can have parents).

Syntax

objDOMNode  = oDOMNode.parentNode

Remarks

Object. The property is read-only. All nodes, except Document, DocumentFragment, and Attribute nodes, can have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, the parent is null.

This value depends on the value of the nodeType property:

NODE_ATTRIBUTE, NODE_DOCUMENT, NODE_DOCUMENT_FRAGMENT
Returns null; these nodes do not have parents.
NODE_CDATA_SECTION
Returns the element or entity reference containing the CDATA section.
NODE_COMMENT
Returns the element, entity reference, document type, or document containing the comment.
NODE_DOCUMENT_TYPE
Returns the document node.
NODE_ELEMENT
Returns the parent node of the element. If the element is the root node in the tree, the parent is the document node. If the node is the document node, parentNode is null.
NODE_ENTITY
Returns the document type node.
NODE_ENTITY_REFERENCE
Returns the element, attribute, or entity reference containing the entity reference.
NODE_NOTATION
Returns the document type node.
NODE_PROCESSING_INSTRUCTION
Returns the document, element, document type, or entity reference containing the processing instruction.
NODE_TEXT
Returns the parent element, attribute, or entity reference.

Applies To


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