org.apache.tools.ant.util
Class DOMElementWriter
java.lang.Object
|
+--org.apache.tools.ant.util.DOMElementWriter
- public class DOMElementWriter
- extends java.lang.Object
Writes a DOM tree to a given Writer.
Utility class used by XmlLogger
and
org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter
XMLJUnitResultFormatter}.
Field Summary |
protected java.lang.String[] |
knownEntities
Don't try to be too smart but at least recognize the predefined
entities. |
Method Summary |
java.lang.String |
encode(java.lang.String value)
Escape <, > & ' and " as their entities. |
boolean |
isReference(java.lang.String ent)
Is the given argument a character or entity reference? |
void |
write(org.w3c.dom.Element element,
java.io.Writer out,
int indent,
java.lang.String indentWith)
Writes a DOM tree to a stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
knownEntities
protected java.lang.String[] knownEntities
- Don't try to be too smart but at least recognize the predefined
entities.
DOMElementWriter
public DOMElementWriter()
write
public void write(org.w3c.dom.Element element,
java.io.Writer out,
int indent,
java.lang.String indentWith)
throws java.io.IOException
- Writes a DOM tree to a stream.
- Parameters:
element
- the Root DOM element of the treeout
- where to send the outputindent
- number ofindentWith
- strings,
that should be used to indent the corresponding tag.
encode
public java.lang.String encode(java.lang.String value)
- Escape <, > & ' and " as their entities.
isReference
public boolean isReference(java.lang.String ent)
- Is the given argument a character or entity reference?
Includes only those classes commonly used by task writers. The Ant 1.4.1 distribution includes complete Javadoc for all classes included in Ant, though in most cases these are not intended as APIs.