Available functions
Function | Description |
---|---|
xpathElementAttribute(String content, String xpathExpression, String attributeId) | Returns the value of the attribute specified by attributeId of the element selected by xpathExpression. |
xpathElementAttribute(String content, String xpathExpression, String attributeId, String encoding) | Returns the value of the attribute specified by attributeId of the element selected by xpathExpression. Content is in specified encoding. |
xpathElementContent(String content, String xpathExpression) | Returns the content of the element selected by xpathExpression. |
xpathElementContent(String content, String xpathExpression, String encoding) | Returns the content of the element selected by xpathExpression. Content is in specified encoding. |
Examples
Consider following XML content:
<?xml version="1.0" encoding="UTF-8"?> <Employees> <Employee id="3"> <age>40</age> <name>Tom</name> <gender>Male</gender> <role>Manager</role> </Employee> <Employee id="4"> <age>25</age> <name>Meghna</name> <gender>Female</gender> <role>Manager</role> </Employee> </Employees>
Overview
Content Tools