Salesforce

XMLModify Examples (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

XMLModify Examples (Magic xpa 4.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>

Updating an Element Value

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.

Updating an Attribute

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.

Reference
Attachment 
Attachment