Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.
  • Madrid
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store

XMLElement - getIterator(String xPath)

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

XMLElement - getIterator(String xPath)

Returns an XMLElementIterator object for the XML element based on the specified parameter.

This method is available only in an Edge Encryption rule action script.

Table 1. Parameters
Name Type Description
xPath String An XPath-like expression that specifies where in the XMLElement object to start.
Table 2. Returns
Type Description
XMLElementIterator An object that will iterate over elements in the XMLElement object.

This example is from the List Edit encryption rule.

function ListEditAction(request) {
	var xmlContent = request.postParams.sysparm_xml.getAsXmlContent();
	for (var xmlElementIter = xmlContent.getIterator('record_update'); xmlElementIter.hasNext(); ) {
		var xmlElement =;
		var tableName = xmlElement.getAttributeValue('table');
		for (var xmlRecordIter = xmlElement.getIterator('record'); xmlRecordIter.hasNext(); ) {
			var xmlRecord =;
			for (var xmlFieldIter = xmlRecord.getIterator('field'); xmlFieldIter.hasNext(); ) {
				var xmlField =;
				var fieldName = xmlField.getAttributeValue('name');
				for (var childIter = xmlField.getIteratorOverAllChildren(); childIter.hasNext(); ) {
					var childElement =;
					childElement.valueFor(tableName, fieldName);