Class Dom2Groovy
java.lang.Object
org.sonatype.maven.polyglot.groovy.Dom2Groovy
A SAX handler for turning XML into Groovy scripts
- Since:
- 0.7
- Author:
- James Strachan, paulk, Jason Dillon
-
Field Summary
Fields -
Constructor Summary
Constructors -
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) protected boolean
mixedContent
(NodeList list) void
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
-
keywords
-
out
protected final groovy.util.IndentPrinter out -
inMixed
protected boolean inMixed -
qt
-
-
Constructor Details
-
Dom2Groovy
-
Dom2Groovy
public Dom2Groovy(groovy.util.IndentPrinter out)
-
-
Method Details
-
print
-
print
- 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()
-