XML Mapping Rules Method
Customize mapping rules by using these methods from the XMLExtUtils class.
Sample mapping rules are available from , under the .
- getNode
-
public static Node getNode(String xpath, Element elem) public static Node getNode(String xpath, Document doc)The following methods evaluate an XPath on an XML document or element to retrieve a Node. Use the following parameters:- xpath
- The XPath to evaluate. This parameter cannot be null or empty.
- elem
- The XML element on which to evaluate the specified XPath.
- doc
- The XML document on which to evaluate the specified XPath.
The following responses are expected:- A node, if successful
- Null, if not successful
- getNodes
-
public static NodeList getNodes(String xpath, Element elem) public static NodeList getNodes(String xpath, Document doc)The following methods evaluate an XPath on an XML document or element to retrieve a Node. Use the following parameters:- xpath
- The XPath to evaluate. This parameter cannot be null or empty.
- elem
- The XML element on which to evaluate the specified XPath.
- doc
- The XML document on which to evaluate the specified XPath.
The following responses are expected:- A NodeList, if successful
- Null, if not successful
See JavaScript whitelist.