Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi I am trying to add a child e

Status
Not open for further replies.

kafmil

Technical User
Jul 15, 2002
71
AU
Hi

I am trying to add a child element to an xml document but I think I may have the syntax wrong. Can anyone help.

' Get the Child content nodes
SET objXMLDataDoc = CreateObject("Msxml2.DOMDocument")
objXMLDataDoc.Load(istrRealPath & strValue)
SET objXMLDataRoot = objXMLDataDoc.getElementsByTagName("content").Item(0)
' Add the node
SET objCopy = objXMLDataRoot.cloneNode(TRUE)
SET objTopNode = objFieldNode.appendChild(objCopy)

<content>
<item>
<field>
i want to add new childnode here
</field>
</item>
</content>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top