Home » Apache Ant AntStructure Task

Apache Ant AntStructure Task

by Online Tutorials Library

Apache Ant AntStructure Task

This task is used to generate a DTD for Ant buildfiles. It contains information about all tasks currently known to Ant.

We can always add XML entities using <taskdef> or <typedef> elements. This task doesn’t know about required attributes.

AntStructure Task Attributes

Attribute Description Required
output A output file to write the DTD. Yes

AntStructure Task Example

We can simply use it using <antstructure> element by specifying output file. See the example below.

If we want to specify a structure other than a DTD, first we need to implement the interface AntStructure.

and then we can use it via typedef element.

You may also like