Partager via


parentNode Property (Windows Embedded CE 6.0)

1/6/2010

Contains the parent node.

Script Syntax

var objXMLDOMNode = oXMLDOMNode.parentNode;

Remarks

Ee502021.collapse(en-US,WinEmbedded.60).gifScript Parameters

None.

Ee502021.collapse(en-US,WinEmbedded.60).gifScript Return Value

Object. 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.

Ee502021.collapse(en-US,WinEmbedded.60).gifC/C++ Syntax

HRESULT get_parentNode(
  IXMLDOMNode** parent
);

Remarks

Ee502021.collapse(en-US,WinEmbedded.60).gifC/C++ Parameters

  • parent
    [out, retval] 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.

Ee502021.collapse(en-US,WinEmbedded.60).gifC/C++ Return Values

  • S_FALSE
    Value returned if there is no parent.
  • S_OK
    Value returned if successful.
  • E_INVALIDARG
    Value returned if parent is Null.

Ee502021.collapse(en-US,WinEmbedded.60).gifRequirements

Header msxml2.h, msxml2.idl
Windows Embedded CE Windows CE .NET 4.0 and later

General Remarks

This value depends on the value of the nodeType property.

Value Description

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.

This property is read-only, and applies to the following objects and interfaces:

IXMLDOMAttribute, IXMLDOMCDATASection, IXMLDOMCharacterData, IXMLDOMComment, DOMDocument, IXMLDOMDocumentFragment, IXMLDOMDocumentType, IXMLDOMElement, IXMLDOMEntity, IXMLDOMEntityReference, IXMLDOMNode, IXMLDOMNotation, IXMLDOMProcessingInstruction, IXMLDOMText, and IXTLRuntime

See Also

Reference

XML DOM Properties

Concepts

nodeType Property