Content
Other docs
Adds a new element at the end.
<ModOp GUID="123" Type="add" Path="/Values">
<Maintenance />
</ModOp>
Result:
<Asset>
<Values>
<Standard>
<GUID>123</GUID>
</Standard>
<Cost />
+ <Maintenance />
</Values>
</Asset>
Adds an element after the selected one.
<ModOp GUID="123" Type="addNextSibling" Path="/Values/Standard">
<Maintenance />
</ModOp>
Result:
<Asset>
<Values>
<Standard>
<GUID>123</GUID>
</Standard>
+ <Maintenance />
<Cost />
</Values>
</Asset>
A common situation is when you want to insert an item at a specific position.
<ModOp GUID="123" Type="addNextSibling" Path="/Values/ConstructionCategory/BuildingList/Item[Building='1000178']">
<Item>
<Building>123</Building>
</Item>
</ModOp>
Result:
<Asset>
<Values>
<Standard>
<GUID>123</GUID>
</Standard>
<ConstructionCategory>
<BuildingList>
<Item>
<Building>1000178</Building>
</Item>
+ <Item>
+ <Building>123</Building>
+ </Item>
<Item>
<Building>1010372</Building>
</Item>
<Item>
<Building>1010343</Building>
</Item>
</BuildingList>
</ConstructionCategory>
</Values>
</Asset>
Same as addNextSibling
just before and not after.
Remove selected nodes.
<ModOp GUID="123" Type="remove" Path="/Values/Cost" />
Result:
<Asset>
<Values>
<Standard>
<GUID>123</GUID>
</Standard>
- <Cost />
</Values>
</Asset>