XMLModify Examples (Magic xpa 3.x)
<?xml version="1.0"?>
<order id="123" xmlns=”http://www.magicsoftware.com”>
<issued_by>
<address>
<street>Somewhere</street>
<city>Nowhere</city>
</address>
</issued_by>
<item cat_num="2145451544">
<price>99.99</price>
<amount>2</amount>
</item>
<item cat_num="1384325456">
<price>19.99</price>
<amount>10</amount>
</item>
</order>
XMLModify (0,1,'/order/item[2]/price','','30')
This example updates the value of the price element, inside the second item element, from 19.99 to 30.00. The return value is 0.
XMLModify (0,1,'/order/item[1]','cat_num','123456')
This example updates the cat_num attribute value of the first item element from '2145451544' to '123456'. The return value is 0.