Package org.apache.groovy.xml.tools
Class DomToGroovy
java.lang.Object
org.apache.groovy.xml.tools.DomToGroovy
A SAX handler for turning XML into Groovy scripts
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected Collection<String>
protected IndentPrinter
protected String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkEscaping
(String localName) protected void
defineNamespace
(Map namespaces, String prefix, String uri) protected Map
defineNamespaces
(Element element, Map namespaces) protected String
escapeQuote
(String text) protected String
getAttributeValue
(Attr attribute) protected String
getLocalName
(Node node) protected String
getTextNodeData
(Text node) static void
protected boolean
mixedContent
(NodeList list) static Document
static Document
parse
(InputStream input) static Document
protected static Document
protected void
void
protected void
protected boolean
printAttributes
(Element element) protected boolean
printAttributeWithoutPrefix
(Attr attribute, boolean hasAttribute) protected void
printAttributeWithPrefix
(Attr attribute, StringBuffer buffer) protected void
printChildren
(Node parent, Map namespaces) protected void
printComment
(Comment comment, boolean endWithComma) protected void
printElement
(Element element, Map namespaces, boolean endWithComma) protected void
protected void
protected void
protected void
printPI
(ProcessingInstruction instruction, boolean endWithComma) protected void
printQuoted
(String text) protected void
-
Field Details
-
out
-
inMixed
protected boolean inMixed -
qt
-
keywords
-
-
Constructor Details
-
DomToGroovy
-
DomToGroovy
-
-
Method Details
-
print
-
main
-
parse
- Throws:
Exception
-
parse
- Throws:
Exception
-
parse
- Throws:
Exception
-
parse
- Throws:
Exception
-
print
-
printElement
-
printQuoted
-
printPI
-
printComment
-
printText
-
escapeQuote
-
defineNamespaces
-
defineNamespace
-
printAttributes
-
printAttributeWithPrefix
-
getAttributeValue
-
printAttributeWithoutPrefix
-
checkEscaping
-
getTextNodeData
-
mixedContent
-
printChildren
-
getLocalName
-
printEnd
-
println
-
print
-
printIndent
protected void printIndent()
-