Class Dom2Groovy
- java.lang.Object
-
- org.sonatype.maven.polyglot.groovy.Dom2Groovy
-
public class Dom2Groovy extends Object
A SAX handler for turning XML into Groovy scripts- Since:
- 0.7
- Author:
- James Strachan, paulk, Jason Dillon
-
-
Constructor Summary
Constructors Constructor Description Dom2Groovy(groovy.util.IndentPrinter out)Dom2Groovy(PrintWriter out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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)protected booleanmixedContent(NodeList list)voidprint(Reader input)protected voidprint(String text)voidprint(Document document)protected voidprint(Node node, Map namespaces, boolean endWithComma)protected 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 voidprintEnd(String text, boolean endWithComma)protected voidprintIndent()protected voidprintln(String text)protected voidprintPI(ProcessingInstruction instruction, boolean endWithComma)protected voidprintQuoted(String text)protected voidprintText(Text node, boolean endWithComma)
-
-
-
Constructor Detail
-
Dom2Groovy
public Dom2Groovy(PrintWriter out)
-
Dom2Groovy
public Dom2Groovy(groovy.util.IndentPrinter out)
-
-
Method Detail
-
print
public void print(Document document)
-
printQuoted
protected void printQuoted(String text)
-
printPI
protected void printPI(ProcessingInstruction instruction, boolean endWithComma)
-
printComment
protected void printComment(Comment comment, boolean endWithComma)
-
printText
protected void printText(Text node, boolean endWithComma)
-
printAttributes
protected boolean printAttributes(Element element)
-
printAttributeWithPrefix
protected void printAttributeWithPrefix(Attr attribute, StringBuffer buffer)
-
printAttributeWithoutPrefix
protected boolean printAttributeWithoutPrefix(Attr attribute, boolean hasAttribute)
-
checkEscaping
protected boolean checkEscaping(String localName)
-
mixedContent
protected boolean mixedContent(NodeList list)
-
printEnd
protected void printEnd(String text, boolean endWithComma)
-
println
protected void println(String text)
-
print
protected void print(String text)
-
printIndent
protected void printIndent()
-
-