Appends newChild as the last child of this node.
Syntax
objXMLDOMNode = oXMLDOMNode.appendChild(newChild)
Parameters
newChild
Object. Address of the new child node to be appended at the end of the list of children of this node.
Returns
Object. Returns the new child node successfully appended to the list.
Remarks
Note that this is equivalent to calling insertBefore(newChild, null). For complete information, see the documentation for insertBefore.
Example
The following VBScript example creates a new XMLDOMNode object, then uses the appendChild method to append it to the document's list of children:
Dim xmlDoc
Dim root
Dim newNode
Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.async = False
xmlDoc.load("c:\books.xml")
Set root = xmlDoc.documentElement
MsgBox root.xml
Set newNode = xmlDoc.createNode (1, "VIDEOS", "")
root.appendChild(newNode)
MsgBox root.xml
Applies To
XMLDOMAttribute, XMLDOMCDATASection, XMLDOMCharacterData, XMLDOMComment, XMLDOMDocument, XMLDOMDocumentFragment, XMLDOMDocumentType, XMLDOMElement, XMLDOMEntity, XMLDOMEntityReference, XMLDOMNode, XMLDOMNotation, XMLDOMProcessingInstruction, XMLDOMText, XTLRuntime