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

Workshop  |  XML (Extensible Markup Language)

IDOMNode::get_parentNode Method


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

Syntax

HRESULT get_parentNode(
    IDOMNode ** parent);

Parameters

parent
[out] Parent of the given node instance. 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.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

This value depends on the value of the nodeType property:

NODE_ATTRIBUTE
,
NODE_DOCUMENT
,
NODE_DOCUMENT_FRAGMENT
Null; they do not have parents.
NODE_CDATA_SECTION
The element or entity reference containing the CDATA section.
NODE_COMMENT
The element, entity reference, document type, or document containing the comment.
NODE_DOCUMENT_TYPE
The document node.
NODE_ELEMENT
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
The document type node.
NODE_ENTITY_REFERENCE
The element, attribute, or entity reference containing the entity reference.
NODE_NOTATION
The document type node.
NODE_PROCESSING_INSTRUCTION
The document, element, document type, or entity reference containing the processing instruction.
NODE_TEXT
The parent element, attribute, or entity reference.

See Also

IDOMNode


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