Share via


lastChild Property

Returns the last child node.

var objXMLDOMNode = oXMLDOMNode.lastChild;

HRESULT get_lastChild(
  IXMLDOMNode** lastChild
);

General Remarks

This value depends on the value of the nodeType property.

Value Description
NODE_ATTRIBUTE, NODE_DOCUMENT, NODE_DOCUMENT_FRAGMENT, NODE_DOCUMENT_TYPE, NODE_ELEMENT, NODE_ENTITY, NODE_ENTITY_REFERENCE Returns the last child node. If there are no children, returns Null.
NODE_CDATA_SECTION, NODE_COMMENT, NODE_NOTATION, NODE_PROCESSING_INSTRUCTION, NODE_TEXT Returns Null. These node types cannot have children.

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

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

See Also

nodeType property

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.