Top Description Inners Fields Constructors Methods
org.apache.tools.ant.taskdefs

public Class EchoXML

extends XMLFragment
Class Inheritance
Imports
java.io.File, .OutputStream, org.apache.tools.ant.BuildException, .Project, org.apache.tools.ant.types.EnumeratedAttribute, org.apache.tools.ant.util.DOMElementWriter, .FileUtils, .XMLFragment, org.w3c.dom.Element, .Node

Echo XML. Known limitations:
  1. Processing Instructions get ignored
  2. Encoding is always UTF-8
Since
Ant 1.7

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private boolean
private static final String
private File
private EchoXML.NamespacePolicy

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
execute()

Execute the task.

public void
setAppend(boolean
boolean append flag.
b
)

Set whether to append the output file.

public void
setFile(File
the output file.
f
)

Set the output file.

public void
setNamespacePolicy(EchoXML.NamespacePolicy
namespace policy: "ignore", "elementsOnly", or "all"
n
)

Set the namespace policy for the xml file

Inherited from org.apache.tools.ant.util.XMLFragment:
addTextcreateDynamicElementgetFragment

Field Detail

appendback to summary
private boolean append
ERROR_NO_XMLback to summary
private static final String ERROR_NO_XML
fileback to summary
private File file
namespacePolicyback to summary
private EchoXML.NamespacePolicy namespacePolicy

Constructor Detail

EchoXMLback to summary
public EchoXML()

Method Detail

executeback to summary
public void execute()

Execute the task.

setAppendback to summary
public void setAppend(boolean b)

Set whether to append the output file.

Parameters
b:boolean

boolean append flag.

setFileback to summary
public void setFile(File f)

Set the output file.

Parameters
f:File

the output file.

setNamespacePolicyback to summary
public void setNamespacePolicy(EchoXML.NamespacePolicy n)

Set the namespace policy for the xml file

Parameters
n:EchoXML.NamespacePolicy

namespace policy: "ignore", "elementsOnly", or "all"

See Also
org.apache.tools.ant.util.DOMElementWriter.XmlNamespacePolicy
org.apache.tools.ant.taskdefs back to summary

public Class EchoXML.NamespacePolicy

extends EnumeratedAttribute
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final String
public static final EchoXML.NamespacePolicy
private static final String
private static final String
Inherited from org.apache.tools.ant.types.EnumeratedAttribute:
value

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public DOMElementWriter.XmlNamespacePolicy
public String[]
getValues()

Implements abstract org.apache.tools.ant.types.EnumeratedAttribute.getValues.

This is the only method a subclass needs to implement..
Inherited from org.apache.tools.ant.types.EnumeratedAttribute:
containsValuegetIndexgetInstancegetValueindexOfValuesetValuetoString

Field Detail

ALLback to summary
private static final String ALL
DEFAULTback to summary
public static final EchoXML.NamespacePolicy DEFAULT
ELEMENTSback to summary
private static final String ELEMENTS
IGNOREback to summary
private static final String IGNORE

Constructor Detail

NamespacePolicyback to summary
public NamespacePolicy()
NamespacePolicyback to summary
public NamespacePolicy(String s)

Method Detail

getPolicyback to summary
public DOMElementWriter.XmlNamespacePolicy getPolicy()
getValuesback to summary
public String[] getValues()

Implements abstract org.apache.tools.ant.types.EnumeratedAttribute.getValues.

Doc from org.apache.tools.ant.types.EnumeratedAttribute.getValues.

This is the only method a subclass needs to implement..

Returns:String[]

an array holding all possible values of the enumeration. The order of elements must be fixed so that indexOfValue(String) always return the same index for the same value.

Annotations
@Override