Home Search

DriveWorks Pro 22

Send Feedback


Returns an array value based on a row per attribute (Name, Value) for each attribute of an XML object given the path to the XML element.


SppXPathGetElementAttributes([XML],[Element Path])


XML is an XML object such as that returned value 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.


SppXPathGetElementAttributes(DWVariableXML, "CustomerInformation\Entry[2]\Details"){"Attribute Name","Attribute Value";"Website","nutsandboltsbrews.co.uk"}Will return a two column Array for the element attributes Name and Value found for the element path given.

Example XML File

Example customer information stored as an XML file.

<?xml version="1.0" encoding="UTF-8"?>
      <Customer>Smith Garage</Customer>
      <Details Website="www.fixmycar.co.uk"/>
      <Customer>Nuts and Bolts Brewing Co</Customer>
      <Details Website="nutsandboltsbrews.co.uk"/>
      <Details Website="FlowerBucket.co.uk"/>