Class Dom4jExtension
- java.lang.Object
-
- org.craftercms.engine.util.groovy.Dom4jExtension
-
public class Dom4jExtension extends Object
Groovy extension module for Dom4j- Author:
- avasquez
- See Also:
- Extension Modules
-
-
Constructor Summary
Constructors Constructor Description Dom4jExtension()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
get(org.dom4j.Node node, String xpathExpression)
Adds a get method to Dom4j nodes, which allows XPath queries through dot notation properties, e.gsiteItem.collection.item[1].text
.
-
-
-
Method Detail
-
get
public static Object get(org.dom4j.Node node, String xpathExpression)
Adds a get method to Dom4j nodes, which allows XPath queries through dot notation properties, e.gsiteItem.collection.item[1].text
. Also, if the result is anElement
, then the element will attempted to be converted based on the content model field conversion algorithm.- Parameters:
node
- the Node object (this)xpathExpression
- the XPath expression or query- Returns:
- the result of the XPath query
-
-