I have the following VB script , I want to remove the "NET2 ID" element from name list how to remove the NET2 ID element , need first to verify if NET2 defined and then to delete it THX
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
objXMLDoc.load("\\dir\d.xml")
Set objRoot = objXMLDoc.documentElement
Set objExNode = objRoot.removeChild(objRoot.childNodes.item(1))
the XML file:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<root version="3.0">
<names>
<NET1 ID="10.10.10.1-10" />
<NET2 ID="10.10.10.1-10" />
</names>
</root>