Apache Ant AntStructure Task - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
Apache Ant AntStructure Task

Apache Ant AntStructure Task

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

AttributeDescriptionRequired
outputA 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.

<antstructure output="project.dtd"/>  

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

package org.example;  
import org.apache.tools.ant.taskdefs.AntStructure;  
public class MyPrinter implements AntStructure.StructurePrinter {  
    ...  
}  

and then we can use it via typedef element.

<typedef name="myprinter" classname="org.example.MyPrinter"/>  
<antstructure output="project.my">  
  <myprinter/>  

About Mariano

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

0 comments:

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.