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
  • Field Details

    • keywords

      protected final List<String> keywords
    • out

      protected final groovy.util.IndentPrinter out
    • inMixed

      protected boolean inMixed
    • qt

      protected String qt
  • Constructor Details

    • Dom2Groovy

      public Dom2Groovy(PrintWriter out)
    • Dom2Groovy

      public Dom2Groovy(groovy.util.IndentPrinter out)
  • Method Details

    • print

      public void print(Document document)
    • print

      public void print(Reader input) throws Exception
      Throws:
      Exception
    • print

      protected void print(Node node, Map namespaces, boolean endWithComma)
    • printElement

      protected void printElement(Element element, Map namespaces, boolean endWithComma)
    • 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)
    • escapeQuote

      protected String escapeQuote(String text)
    • defineNamespaces

      protected Map defineNamespaces(Element element, Map namespaces)
    • defineNamespace

      protected void defineNamespace(Map namespaces, String prefix, String uri)
    • printAttributes

      protected boolean printAttributes(Element element)
    • printAttributeWithPrefix

      protected void printAttributeWithPrefix(Attr attribute, StringBuffer buffer)
    • getAttributeValue

      protected String getAttributeValue(Attr attribute)
    • printAttributeWithoutPrefix

      protected boolean printAttributeWithoutPrefix(Attr attribute, boolean hasAttribute)
    • checkEscaping

      protected boolean checkEscaping(String localName)
    • getTextNodeData

      protected String getTextNodeData(Text node)
    • mixedContent

      protected boolean mixedContent(NodeList list)
    • printChildren

      protected void printChildren(Node parent, Map namespaces)
    • getLocalName

      protected String getLocalName(Node node)
    • printEnd

      protected void printEnd(String text, boolean endWithComma)
    • println

      protected void println(String text)
    • print

      protected void print(String text)
    • printIndent

      protected void printIndent()