org.activemath.omdocjdom
Class XMLOutputterWithClasses
java.lang.Object
org.jdom.output.XMLOutputter
org.activemath.omdocjdom.XMLOutputterWithClasses
- All Implemented Interfaces:
- Cloneable
public class XMLOutputterWithClasses
- extends org.jdom.output.XMLOutputter
A debug-oriented XML-outputter which puts, inside the nodes
the class-name.
- Version:
| Nested classes/interfaces inherited from class org.jdom.output.XMLOutputter |
org.jdom.output.XMLOutputter.NamespaceStack |
| Fields inherited from class org.jdom.output.XMLOutputter |
currentFormat, preserveFormat |
|
Method Summary |
static Set |
getAllNodeClassesIn(org.jdom.Document doc)
Goes through the tree and collects the classe of each node
in the tree. |
static Set |
getAllNodeClassesIn(org.jdom.Element elt)
Goes through the tree and collects the classe of each node
in the tree. |
static void |
main(String[] args)
|
protected void |
outputClass(Object ob,
Writer out)
|
protected void |
printAttributes(List attributes,
org.jdom.Element parent,
Writer out,
org.jdom.output.XMLOutputter.NamespaceStack namespaces)
|
protected void |
printCDATA(org.jdom.CDATA cdata,
Writer out)
|
protected void |
printComment(org.jdom.Comment comment,
Writer out)
|
protected void |
printDeclaration(org.jdom.Document doc,
Writer out,
String encoding)
|
protected void |
printDocType(org.jdom.DocType docType,
Writer out)
|
protected void |
printElement(org.jdom.Element element,
Writer out,
int level,
org.jdom.output.XMLOutputter.NamespaceStack namespaces)
|
protected void |
printEntityRef(org.jdom.EntityRef entity,
Writer out)
|
protected void |
printProcessingInstruction(org.jdom.ProcessingInstruction pi,
Writer out)
|
protected void |
printString(String str,
Writer out)
|
protected void |
printText(org.jdom.Text text,
Writer out)
|
| Methods inherited from class org.jdom.output.XMLOutputter |
clone, escapeAttributeEntities, escapeElementEntities, getFormat, output, output, output, output, output, output, output, output, output, output, output, output, output, output, output, output, output, output, outputElementContent, outputElementContent, outputString, outputString, outputString, outputString, outputString, outputString, outputString, outputString, outputString, printAttributes, printCDATA, printComment, printDeclaration, printDocType, printElement, printEntityRef, printProcessingInstruction, printText, setFormat, shouldOutputAttribute, shouldOutputNamespace, toString |
XMLOutputterWithClasses
public XMLOutputterWithClasses()
outputClass
protected void outputClass(Object ob,
Writer out)
throws IOException
- Throws:
IOException
printAttributes
protected void printAttributes(List attributes,
org.jdom.Element parent,
Writer out,
org.jdom.output.XMLOutputter.NamespaceStack namespaces)
throws IOException
- Throws:
IOException
printCDATA
protected void printCDATA(org.jdom.CDATA cdata,
Writer out)
throws IOException
- Throws:
IOException
printComment
protected void printComment(org.jdom.Comment comment,
Writer out)
throws IOException
- Throws:
IOException
printDeclaration
protected void printDeclaration(org.jdom.Document doc,
Writer out,
String encoding)
throws IOException
- Throws:
IOException
printDocType
protected void printDocType(org.jdom.DocType docType,
Writer out)
throws IOException
- Throws:
IOException
printElement
protected void printElement(org.jdom.Element element,
Writer out,
int level,
org.jdom.output.XMLOutputter.NamespaceStack namespaces)
throws IOException
- Throws:
IOException
printEntityRef
protected void printEntityRef(org.jdom.EntityRef entity,
Writer out)
throws IOException
- Throws:
IOException
printProcessingInstruction
protected void printProcessingInstruction(org.jdom.ProcessingInstruction pi,
Writer out)
throws IOException
- Throws:
IOException
printString
protected void printString(String str,
Writer out)
throws IOException
- Throws:
IOException
printText
protected void printText(org.jdom.Text text,
Writer out)
throws IOException
- Throws:
IOException
getAllNodeClassesIn
public static Set getAllNodeClassesIn(org.jdom.Element elt)
- Goes through the tree and collects the classe of each node
in the tree. Nodes are elements,attributes, texts, processing-instructions,
cdata-sections, entity references.
getAllNodeClassesIn
public static Set getAllNodeClassesIn(org.jdom.Document doc)
- Goes through the tree and collects the classe of each node
in the tree. Nodes are document, doc-type, elements, attributes, texts, processing-instructions,
cdata-sections, entity references.
main
public static void main(String[] args)
throws Exception
- Throws:
Exception