XMLElement

Provides methods for iterating through XML elements and mapping values to fields in a table.

You get an XMLElement object by calling the next() method of an XMLElementIterator object.

XMLElement - getIterator(String xPath)

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

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 can be used to iterate over elements in the XMLElement object.

XMLElement - getIteratorOverAllChildren()

Returns an XMLElementIterator object that includes all sub-elements for the XML element based on the specified parameter.

Table 3. Parameters
Name Type Description
None
Table 4. Returns
Type Description
XMLElementIterator An object that can be used to iterate over elements in the XMLElement object.

XMLElement - valueFor(String tableName, String fieldName)

Specifies that the value of the element maps to the specified field in the specified table.

Calling this method on an element value tells the proxy that the value for this element maps to the specified field in the specified table. The proxy then checks if the field must be encrypted. If the table and field names are unknown, you can call the valueFor() method on a table and a field that are dynamically assigned based on the request.

Table 5. Parameters
Name Type Description
tableName String The table name.
fieldName String The field name.
Table 6. Returns
Type Description
void

XMLElement - encodedQueryFor(String tableName)

Specifies that the value of the element is an encoded query for the specified table.

Calling this function on an element tells the proxy that the value of the element is an encoded query for the specified table. The proxy parses the encoded query and encrypts the fields in the encoded query that must be encrypted.

Table 7. Parameters
Name Type Description
tableName String The table that you expect the query to run on.
Table 8. Returns
Type Description
void

XMLElement - getName()

Returns the element name.

Table 9. Parameters
Name Type Description
None
Table 10. Returns
Type Description
String The element name.

XMLElement - getAttributeValue(String attribute)

Returns the value of the specified attribute.

Table 11. Parameters
Name Type Description
attribute String Attribute name.
Table 12. Returns
Type Description
String The attribute value.