lazytrucker
Programmer
Whilst tying to insert a node before a certain element I keep getting a parentheses error:
Cannot use parentheses when calling a Sub
xmldoc.documentelement.insertBefore(Journey,xmldoc.documentelement.childnodes.item(i).childnodes.item(1))
I Have tried several methods:
1:
set Journey=xmldoc.createelement("Journey")
Journey.text= "Blank_For_Loop_Purposes"
xmldoc.documentelement.childnodes.item(i).childnodes.item(1).appendchild(Journey)
xmldoc.documentelement.insertBefore(Journey,xmldoc.documentelement.childnodes.item(i).childnodes.item(1))
2:
var new_node = xml_doc.createElement("Journey")
var new_text = xml_doc.createTextNode("Blank_For_Loop_Purposes")
new_node.appendChild(new_text)
'var root = xml_doc.documentElement
root.insertBefore(new_node, root.childnodes.item(i).childnodes.item(1))
All result in the same error mentioned above anyone got any ideas??
Cheers LazyTrucker.
Cannot use parentheses when calling a Sub
xmldoc.documentelement.insertBefore(Journey,xmldoc.documentelement.childnodes.item(i).childnodes.item(1))
I Have tried several methods:
1:
set Journey=xmldoc.createelement("Journey")
Journey.text= "Blank_For_Loop_Purposes"
xmldoc.documentelement.childnodes.item(i).childnodes.item(1).appendchild(Journey)
xmldoc.documentelement.insertBefore(Journey,xmldoc.documentelement.childnodes.item(i).childnodes.item(1))
2:
var new_node = xml_doc.createElement("Journey")
var new_text = xml_doc.createTextNode("Blank_For_Loop_Purposes")
new_node.appendChild(new_text)
'var root = xml_doc.documentElement
root.insertBefore(new_node, root.childnodes.item(i).childnodes.item(1))
All result in the same error mentioned above anyone got any ideas??
Cheers LazyTrucker.