${singleNode()}
Returns the first node that matches the specified XPATH expression when evaluated against the SOURCE node.
| Name | XPath | Description | Reagent Type | Expected Type | Required |
|---|---|---|---|---|---|
| CACHE | @cache | A shared Map to cache items in. The default is the value of the 'Attributes.CACHE' request attribute. | PHRASE | java.util.Map | No |
| CACHE_MODEL | @cache-model | Specify either NONE, ONE, or ALL. | PHRASE | java.lang.String | No |
| SOURCE | @source | Optional source node against which the XPATH expression will be evaluated. If not provided, the value of the 'Attributes.NODE' request attribute will be used. | PHRASE | org.dom4j.Node | No |
| XPATH | descendant-or-self::text() | An XPATH expression. | PHRASE | java.lang.String | Yes |
Parses the 'books.xml' document, adds a '<book>' child element, places a comment before the '<book>' element, then writes the file back to the same location:
Middlemarch