I have an XML document similar to the structure below. Using visual basic how can I insert nodes at the different levels depending on Id & Name.
does Xpath allow me to insert new nodes or does it only allow the modification of existing nodes?
so for example if I wanted to add <BuildingPart Id="B012" Name="Bedroom" Type="Room"/> after "B011 Bathroom" how can this be achieved?
<Buildings>
<BuildingPart Id="B001" Name="House">
<BuildingPart Id="B002" Name="Level 1" Type="Level">
<BuildingPart Id="B003" Name="Kitchen" Type="Room"/>
<BuildingPart Id="B004" Name="Bedroom" Type="Room"/>
<BuildingPart Id="B005" Name="Lounge" Type="Room"/>
<BuildingPart Id="B006" Name="Bathroom" Type="Room"/>
</BuildingPart>
<BuildingPart Id="B007" Name="Level 2" Type="Level">
<BuildingPart Id="B008" Name="Bedroom" Type="Room"/>
<BuildingPart Id="B009" Name="Bedroom" Type="Room"/>
<BuildingPart Id="B010" Name="Study" Type="Room"/>
<BuildingPart Id="B011" Name="Bathroom" Type="Room"/>
</BuildingPart>
</BuildingPart>
</Buildings>
Thanks.