<write-document>
Writes the specified source node to the specified file system location.
| Name | XPath | Description | Reagent Type | Expected Type | Required |
|---|---|---|---|---|---|
| FILE | @file | File system location to which the document should be written. | PHRASE | java.lang.String | Yes |
| NODE | @node | Optional source node to be written. If not provided, the value of the 'Attributes.NODE' request attribute will be used. | PHRASE | org.dom4j.Node | No |
Creates a new XML document containing '<example foo="bar"/>', then writes it to the file 'example.xml':
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