<append-node>
Adds the specified XML content to the specified PARENT (at the end) or after the specified SIBLING.
See also: <prepend-node>
| Name | XPath | Description | Reagent Type | Expected Type | Required |
|---|---|---|---|---|---|
| NODE | @node | Optional node that will be appended. If not provided, the 'Attributes.NODE' request attribute will be used. | PHRASE | org.dom4j.Node | No |
| PARENT | @parent | Optional node under which the specified content will be added. Specify only PARENT or SIBLING, not both. If neither is specified, the 'Attributes.NODE' request attribute will be used as a PARENT. | PHRASE | org.dom4j.Node | No |
| SIBLING | @sibling | Optional node after which the specified content will be added. Specify only PARENT or SIBLING, not both. | PHRASE | org.dom4j.Node | No |
| CONTENT | * | Optional XML nodes to append. Use this reagent to specify content in-line. If CONTENT is present, it will be prefered over NODE. | NODE_LIST | java.util.List | No |
| APPLY_NAMESPACE | @apply-namespace | Tells this task whether to reconstruct the QNames of added elements to include the namespace of the parent element if: (1) the parent contains a namespace; and (2) the intended child does not. The default is Boolean.TRUE. | PHRASE | java.lang.Boolean | 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