edu.umd.cs.findbugs.xml

Class Dom4JXMLOutput

public class Dom4JXMLOutput extends Object implements XMLOutput

XMLOutput class to build all or part of a dom4j tree.

Author: David Hovemeyer

See Also: XMLOutput

Constructor Summary
Dom4JXMLOutput(Branch topLevel)
Constructor.
Method Summary
voidaddAttribute(String name, String value)
voidbeginDocument()
voidcloseTag(String tagName)
voidfinish()
voidopenCloseTag(String tagName)
voidopenCloseTag(String tagName, XMLAttributeList attributeList)
voidopenTag(String tagName)
voidopenTag(String tagName, XMLAttributeList attributeList)
voidstartTag(String tagName)
voidstopTag(boolean close)
voidwrite(XMLWriteable obj)
Add given object to the tree.
voidwriteCDATA(String cdata)
voidwriteCollection(Collection<? extends XMLWriteable> collection)
Add a Collection of XMLWriteable objects to the tree.
voidwriteElementList(String tagName, Collection<String> listValues)
Add a list of Strings to document as elements with given tag name to the tree.
voidwriteText(String text)

Constructor Detail

Dom4JXMLOutput

public Dom4JXMLOutput(Branch topLevel)
Constructor.

Parameters: topLevel the Document or Element that is the root of the tree to be built

Method Detail

addAttribute

public void addAttribute(String name, String value)

beginDocument

public void beginDocument()

closeTag

public void closeTag(String tagName)

finish

public void finish()

openCloseTag

public void openCloseTag(String tagName)

openCloseTag

public void openCloseTag(String tagName, XMLAttributeList attributeList)

openTag

public void openTag(String tagName)

openTag

public void openTag(String tagName, XMLAttributeList attributeList)

startTag

public void startTag(String tagName)

stopTag

public void stopTag(boolean close)

write

public void write(XMLWriteable obj)
Add given object to the tree.

Parameters: obj the object

writeCDATA

public void writeCDATA(String cdata)

writeCollection

public void writeCollection(Collection<? extends XMLWriteable> collection)
Add a Collection of XMLWriteable objects to the tree.

Parameters: collection Collection of XMLWriteable objects

writeElementList

public void writeElementList(String tagName, Collection<String> listValues)
Add a list of Strings to document as elements with given tag name to the tree.

Parameters: tagName the tag name listValues Collection of String values to add

writeText

public void writeText(String text)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.