I'm trying to insert / add a new node into an XML file and I can't seem to figure out the correct scripting (using either vbscript or javascript). Below is a sample of the XML file and I have the area I'm trying to insert a node into with red font.
<WebData ID="T0" Desc="Standard Reports" xmlns="x-schema:TreeSchema.xml">
<Node ID="C1000" Desc="Hardware Reports" A="1">
<Node ID="S1002" Desc="CD-ROM" A="1">
<Node ID="N37" A="1" CatID="1" F="0" SP="usp_SMSR37" />
<Node ID="N4" A="1" CatID="1" F="1" SP="usp_SMSR04" />
<Node ID="N6" A="1" CatID="1" F="1" SP="usp_SMSR06" />
<Node ID="N38" A="1" CatID="1" F="1" SP="usp_smsr38" />
<Node ID="N5" A="1" CatID="1" F="0" SP="usp_SMSR05" />
</Node>
<Node ID="C4000" Desc="Software Reports" A="1">
<Node ID="S4001"A="1">
<Node ID="N510" A="1" CatID="4" HDT="1" />
<Node ID="N507" A="1" SP="usp_SMSR507" />
<Node ID="N500" A="1" CatID="4" F="0" SP="usp_SMSR500" />
<Node ID="N501" A="1" CatID="4" F="1" SP="usp_SMSR501" />
<Node ID="N528" A="1" CatID="4" F="0" SP="usp_SMSR528" />
</Node>
<Node ID="S4002" Desc="Files" A="1">
<Node ID="N508" A="1" CatID="4" F="1" SP="usp_SMSR508" />
<Node ID="N502" A="1" CatID="2" F="1" SP="usp_SMSR502" />
<Node ID="N505" A="1" CatID="4" F="1" SP="usp_SMSR505" />
< Node ID="N515" A="0" CatID="4" F="1" SP="usp_SMSR515" />
Put new Node (N516) with attributes Here
</Node>
</Node>
</WebData>
Thanks for any help!
<WebData ID="T0" Desc="Standard Reports" xmlns="x-schema:TreeSchema.xml">
<Node ID="C1000" Desc="Hardware Reports" A="1">
<Node ID="S1002" Desc="CD-ROM" A="1">
<Node ID="N37" A="1" CatID="1" F="0" SP="usp_SMSR37" />
<Node ID="N4" A="1" CatID="1" F="1" SP="usp_SMSR04" />
<Node ID="N6" A="1" CatID="1" F="1" SP="usp_SMSR06" />
<Node ID="N38" A="1" CatID="1" F="1" SP="usp_smsr38" />
<Node ID="N5" A="1" CatID="1" F="0" SP="usp_SMSR05" />
</Node>
<Node ID="C4000" Desc="Software Reports" A="1">
<Node ID="S4001"A="1">
<Node ID="N510" A="1" CatID="4" HDT="1" />
<Node ID="N507" A="1" SP="usp_SMSR507" />
<Node ID="N500" A="1" CatID="4" F="0" SP="usp_SMSR500" />
<Node ID="N501" A="1" CatID="4" F="1" SP="usp_SMSR501" />
<Node ID="N528" A="1" CatID="4" F="0" SP="usp_SMSR528" />
</Node>
<Node ID="S4002" Desc="Files" A="1">
<Node ID="N508" A="1" CatID="4" F="1" SP="usp_SMSR508" />
<Node ID="N502" A="1" CatID="2" F="1" SP="usp_SMSR502" />
<Node ID="N505" A="1" CatID="4" F="1" SP="usp_SMSR505" />
< Node ID="N515" A="0" CatID="4" F="1" SP="usp_SMSR515" />
Put new Node (N516) with attributes Here
</Node>
</Node>
</WebData>
Thanks for any help!