Reputation: 45
i'm trying to add a child node to the GG node.
Dim objCurrNode : objCurrNode = "/AA/BB/CC/DD/EE/FF[@name=""Hello""]/GG"
Set objKid = oXML.createElement("HH")
objCurrNode.appendChild (objKid)
I get Object required... What am i doing wrong ?
Thanks :)
Upvotes: 0
Views: 724
Reputation: 38745
To make objCurrNode.appendChild objKid
(without (), because you call a Sub) work, objCurNode
must be an object, it has to be assigned to with Set. The XPath expression
"/AA/BB/CC/DD/EE/FF[@name=""Hello""]/GG"
can't be used to create an object, but you could use the .selectSingleNode method to find the node.
Upvotes: 1