org.apache.tools.ant.util
Class XMLFragment
- Cloneable, DynamicElementNS
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.
void | addText(String s) - Add nested text, expanding properties as we go
|
Object | createDynamicElement(String uri, String name, String qName) - Creates a nested element.
|
DocumentFragment | getFragment()
|
XMLFragment
public XMLFragment()
Constructor for XMLFragment object.
addText
public void addText(String s)
Add nested text, expanding properties as we go
createDynamicElement
public Object createDynamicElement(String uri,
String name,
String qName)
Creates a nested element.
- createDynamicElement in interface DynamicElementNS
uri
- the uri of the nested elementname
- the localname of the nested elementqName
- the qualified name of the nested element
- an object that the element is applied to
getFragment
public DocumentFragment getFragment()
- the DocumentFragment that corresponds to the nested
structure.