Package org.apache.groovy.xml.tools
Class DomToGroovy
- java.lang.Object
- 
- org.apache.groovy.xml.tools.DomToGroovy
 
- 
 public class DomToGroovy extends Object A SAX handler for turning XML into Groovy scripts
- 
- 
Field SummaryFields Modifier and Type Field Description protected booleaninMixedprotected Collection<String>keywordsprotected IndentPrinteroutprotected Stringqt
 - 
Constructor SummaryConstructors Constructor Description DomToGroovy(IndentPrinter out)DomToGroovy(PrintWriter out)
 - 
Method SummaryAll Methods Static 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)static voidmain(String[] args)protected booleanmixedContent(NodeList list)static Documentparse(File file)static Documentparse(InputStream input)static Documentparse(Reader input)protected static Documentparse(String fileName)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)
 
- 
- 
- 
Field Detail- 
outprotected IndentPrinter out 
 - 
inMixedprotected boolean inMixed 
 - 
qtprotected String qt 
 - 
keywordsprotected Collection<String> keywords 
 
- 
 - 
Constructor Detail- 
DomToGroovypublic DomToGroovy(PrintWriter out) 
 - 
DomToGroovypublic DomToGroovy(IndentPrinter out) 
 
- 
 - 
Method Detail- 
printpublic void print(Document document) 
 - 
mainpublic static void main(String[] args) 
 - 
parsepublic static Document parse(InputStream input) throws Exception - Throws:
- Exception
 
 - 
printQuotedprotected void printQuoted(String text) 
 - 
printPIprotected void printPI(ProcessingInstruction instruction, boolean endWithComma) 
 - 
printCommentprotected void printComment(Comment comment, boolean endWithComma) 
 - 
printTextprotected void printText(Text node, boolean endWithComma) 
 - 
printAttributesprotected boolean printAttributes(Element element) 
 - 
printAttributeWithPrefixprotected void printAttributeWithPrefix(Attr attribute, StringBuffer buffer) 
 - 
printAttributeWithoutPrefixprotected boolean printAttributeWithoutPrefix(Attr attribute, boolean hasAttribute) 
 - 
checkEscapingprotected boolean checkEscaping(String localName) 
 - 
mixedContentprotected boolean mixedContent(NodeList list) 
 - 
printEndprotected void printEnd(String text, boolean endWithComma) 
 - 
printlnprotected void println(String text) 
 - 
printprotected void print(String text) 
 - 
printIndentprotected void printIndent() 
 
- 
 
-