Parse XML payloads

Fields in XML format can be parsed with the system's getXMLText function.

Fields that get inserted into the database in XML format, such as the payload of an ecc_event row, can be parsed with the system's getXMLText function. The getXMLText function takes a string and an XPATH expression. For example:
var name = gs.getXMLText("<name>joe</name>", "//name");

returns the string 'joe'.

Assuming that the field "payload" contains XML, the function call might look like:
var name = gs.getXMLText(current.payload, "//name");

For information on XPATH, visit w3schools.