Since Apache Ant 1.7
Echo nested XML to the console or a file.
| Attribute | Description | Required |
|---|---|---|
| file | The file to receive the XML. | No; by default nested XML is echoed to the log |
| append | Whether to append file, if specified. | No; default is false |
| namespacePolicy | Sets the namespace policy as defined
by org.apache.tools.ant.util.DOMElementWriter.XmlNamespacePolicy. Valid values
are ignore, elementsOnly, or all. Since Apache Ant 1.8 |
No; default ignore |
Nested XML content is required.
Create an Ant buildfile, subbuild.xml.
<echoxml file="subbuild.xml">
<project default="foo">
<target name="foo">
<echo>foo</echo>
</target>
</project>
</echoxml>