Constructor and Description |
---|
Dom4JXMLOutput(org.dom4j.Branch topLevel)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(java.lang.String name,
java.lang.String value)
Add an attribute to a started tag.
|
void |
beginDocument()
Begin the XML document.
|
void |
closeTag(java.lang.String tagName)
Close tag with given name.
|
void |
finish()
Finish writing XML output, closing any underlying resources (such as
output streams).
|
void |
openCloseTag(java.lang.String tagName)
Open and close tag with given name.
|
void |
openCloseTag(java.lang.String tagName,
XMLAttributeList attributeList)
Open and close tag with given name and given attributes.
|
void |
openTag(java.lang.String tagName)
Open a tag with given name.
|
void |
openTag(java.lang.String tagName,
XMLAttributeList attributeList)
Open a tag with given name and given attributes.
|
void |
startTag(java.lang.String tagName)
Start a tag, with the intention of adding attributes.
|
void |
stopTag(boolean close)
End a started tag.
|
void |
write(XMLWriteable obj)
Add given object to the tree.
|
void |
writeCDATA(java.lang.String cdata)
Write a CDATA section to the XML document.
|
void |
writeCollection(java.util.Collection<? extends XMLWriteable> collection)
Add a Collection of XMLWriteable objects to the tree.
|
void |
writeElementList(java.lang.String tagName,
java.util.Collection<java.lang.String> listValues)
Add a list of Strings to document as elements with given tag name to the
tree.
|
void |
writeText(java.lang.String text)
Write text to the XML document.
|
public Dom4JXMLOutput(org.dom4j.Branch topLevel)
topLevel
- the Document or Element that is the root of the tree to be
builtpublic void beginDocument()
XMLOutput
beginDocument
in interface XMLOutput
public void openTag(java.lang.String tagName)
XMLOutput
public void openTag(java.lang.String tagName, XMLAttributeList attributeList)
XMLOutput
public void openCloseTag(java.lang.String tagName)
XMLOutput
openCloseTag
in interface XMLOutput
tagName
- the tag namepublic void openCloseTag(java.lang.String tagName, XMLAttributeList attributeList)
XMLOutput
openCloseTag
in interface XMLOutput
tagName
- the tag nameattributeList
- the attributespublic void startTag(java.lang.String tagName)
XMLOutput
public void addAttribute(java.lang.String name, java.lang.String value)
XMLOutput
addAttribute
in interface XMLOutput
name
- the attribute name.value
- the attribute value, unescaped.public void stopTag(boolean close)
XMLOutput
public void closeTag(java.lang.String tagName)
XMLOutput
public void writeText(java.lang.String text)
XMLOutput
public void writeCDATA(java.lang.String cdata)
XMLOutput
writeCDATA
in interface XMLOutput
cdata
- the character data to writepublic void writeElementList(java.lang.String tagName, java.util.Collection<java.lang.String> listValues)
tagName
- the tag namelistValues
- Collection of String values to addpublic void write(XMLWriteable obj)
obj
- the objectpublic void writeCollection(java.util.Collection<? extends XMLWriteable> collection)
collection
- Collection of XMLWriteable objectspublic void finish()
XMLOutput
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.