DriveWorks Pro 15: SppXPathSetElementValue [send feedback...]

SppXPathSetElementValue

Returns an XML formatted object with elements set either individually or loaded from an array (such as a data table).

Syntax

SppXPathSetElementValue([XML],[Element Path],[New Element Name],[Value])

Where:

XML is an XML object such as that returned from SppXMLLoad or SppXMLFromString, or XML as a text string.

Element Path is a full path to the element inside the XML object (for example Quote\Customer). If the element is part of an array with the same name, the path would need to use an instance number (for example Quote\Customer[6] to return the value for the sixth item.

Element Path is case sensitive.

New Element Name is the new name for the element whose values are set when loaded from an array. (Not applicable when using a string to set a value.)

Value is the new value for the element. This can be a string or table array. If a table array is used to add multiple elements with children (one child for each row), then the element name of each child is set to the value entered for New Element name.

Examples

RuleMeaning
SppXPathSetElementValue(DWVariableXMLFromString,"Bom\Items\Item","Price",459.85)Will set the Price element to 459.85.

Table of Contents