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
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Collection<String>protected IndentPrinterprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckEscaping(String localName) protected voiddefineNamespace(Map namespaces, String prefix, String uri) protected MapdefineNamespaces(Element element, Map namespaces) protected StringescapeQuote(String text) protected StringgetAttributeValue(Attr attribute) protected StringgetLocalName(Node node) protected StringgetTextNodeData(Text node) static voidprotected booleanmixedContent(NodeList list) static Documentstatic Documentparse(InputStream input) static Documentprotected static Documentprotected voidvoidprotected voidprotected booleanprintAttributes(Element element) protected booleanprintAttributeWithoutPrefix(Attr attribute, boolean hasAttribute) protected voidprintAttributeWithPrefix(Attr attribute, StringBuffer buffer) protected voidprintChildren(Node parent, Map namespaces) protected voidprintComment(Comment comment, boolean endWithComma) protected voidprintElement(Element element, Map namespaces, boolean endWithComma) protected voidprotected voidprotected voidprotected voidprintPI(ProcessingInstruction instruction, boolean endWithComma) protected voidprintQuoted(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()
-