Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

XML content

Log in to subscribe to topics and get notified when content changes.

XML content

You can access XML data from either a post parameter or from the HTTP request content.

You access XML data in a post parameter by calling request.postParams.<parameter name>.getAsXmlContent().

You access XML data in the request content by calling request.getAsXmlContent().

Calling either of these two functions returns an object of type XMLContent that provides methods to iterate over the XML content.

An example using an XMLContent object with the following XML.
        <name>'Test Record 1'</name>
        <description>'Test Record 1 Description'</description>
        <name>'Test Record 2'</name>
        <description>'Test Record 2 Description'</description>
To iterate through the XML, you can do the following.
var xmlContent = request.getAsXmlContent();
// This outer loop will iterate over all record elements
for (var xmlElementIter = xmlContent.getIterator(/records/record); xmlElementIter.hasNext(); ) {
    var xmlElement =;
    // This inner look will iterate over all elements within each record element
    for (var childIter = xmlElement.getIteratorOverAllChildren(); childIter.hasNext(); ) {
        var childElement =;
        var fieldname = childElement.getName();                
By calling xmlContent.getIterator(/records/record) you can iterate over the record elements by calling hasNext() to determine if there is another element with the path specified in the expression argument in the call to getIterator(). The next() method gives you the next element found matching the expression. An object of type XMLElement is returned.