Appending a node to existing XML
Hello all,
I want to append a node to an existing xml.
the existing xml is as follows...
<Transmission>
<ItemMaster>
<Item>
<ItemId>111</ItemId>
<ItemName>I1</ItemName>
</Item>
<Item>
<ItemId>112</ItemId>
<ItemName>I2</ItemName>
</Item>
<Item>
<ItemId>113</ItemId>
<ItemName>I3</ItemName>
</Item>
</ItemMaster>
</Transmission>
Now I want to add anew node to existing xml as follows,
<Location>
<LocId>l1</LocId>
<LocName>loc aaa</LocName>
</Location>
So by appending the location node to existing xml now my xml should look like this....
<Transmission>
<ItemMaster>
<Item>
<ItemId>111</ItemId>
<ItemName>I1</ItemName>
</Item>
<Item>
<ItemId>112</ItemId>
<ItemName>I2</ItemName>
</Item>
<Item>
<ItemId>113</ItemId>
<ItemName>I3</ItemName>
</Item>
</ItemMaster>
<Location>
<LocId>l1</LocId>
<LocName>loc aaa</LocName>
</Location>
<Location>
<LocId>l2</LocId>
<LocName>loc bbb</LocName>
</Location>
</Transmission>
Can anybody help me to resolve the issue...
Thanks in advance!!!!!!!!
Sarala
|