Package org.apache.tools.ant.util
Class XMLFragment
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.util.XMLFragment
- All Implemented Interfaces:
- Cloneable,- DynamicElementNS
- Direct Known Subclasses:
- EchoXML
Use this class as a nested element if you want to get a literal DOM
 fragment of something nested into your task/type.
 
This is useful for tasks that want to deal with the "real" XML from the build file instead of objects.
Code heavily influenced by code written by Dominique Devienne.
- Since:
- Ant 1.7
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionclassAn object to handle (recursively) nested elements.
- 
Field SummaryFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd nested text, expanding properties as we gocreateDynamicElement(String uri, String name, String qName) Creates a nested element.Methods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
- 
Constructor Details- 
XMLFragmentpublic XMLFragment()Constructor for XMLFragment object.
 
- 
- 
Method Details- 
getFragment- Returns:
- the DocumentFragment that corresponds to the nested structure.
 
- 
addTextAdd nested text, expanding properties as we go- Parameters:
- s- the text to add
 
- 
createDynamicElementCreates a nested element.- Specified by:
- createDynamicElementin interface- DynamicElementNS
- Parameters:
- uri- the uri of the nested element
- name- the localname of the nested element
- qName- the qualified name of the nested element
- Returns:
- an object that the element is applied to
 
 
-