DriveWorks Pro 16: SppXPathGetElementValue [send feedback...]


Returns a single value of a specified element in an xml value.

If the element itself has children, then an array value of the child data will be returned.


SppXPathGetElementValue([XML],[Element Path],[Result as XML],[Show Siblings])


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

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

Element Path is case sensitive.

Result as XML is TRUE to show the result in XML format, if the result is itself an element or array of elements. FALSE to show the result as a value or array value.

Show Siblings is TRUE to show values for all elements of the same name, FALSE to return the first instance of the element.


SppXPathGetElementValue(DWVariableXMLFromString,"BOM\Items\Item",FALSE,FALSE)Will return the values for all elements from the first instance of the path \Item as an array.

Table of Contents