Class Dom4jExtension
java.lang.Object
org.craftercms.engine.util.groovy.Dom4jExtension
Groovy extension module for Dom4j
- Author:
- avasquez
- See Also:
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Dom4jExtension
public Dom4jExtension()
-
-
Method Details
-
get
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
-