public class DomToGroovy
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
inMixed |
protected java.util.Collection<java.lang.String> |
keywords |
protected IndentPrinter |
out |
protected java.lang.String |
qt |
Constructor and Description |
---|
DomToGroovy(IndentPrinter out) |
DomToGroovy(java.io.PrintWriter out) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkEscaping(java.lang.String localName) |
protected void |
defineNamespace(java.util.Map namespaces,
java.lang.String prefix,
java.lang.String uri) |
protected java.util.Map |
defineNamespaces(org.w3c.dom.Element element,
java.util.Map namespaces) |
protected java.lang.String |
escapeQuote(java.lang.String text) |
protected java.lang.String |
getAttributeValue(org.w3c.dom.Attr attribute) |
protected java.lang.String |
getLocalName(org.w3c.dom.Node node) |
protected java.lang.String |
getTextNodeData(org.w3c.dom.Text node) |
static void |
main(java.lang.String[] args) |
protected boolean |
mixedContent(org.w3c.dom.NodeList list) |
static org.w3c.dom.Document |
parse(java.io.File file) |
static org.w3c.dom.Document |
parse(java.io.InputStream input) |
static org.w3c.dom.Document |
parse(java.io.Reader input) |
protected static org.w3c.dom.Document |
parse(java.lang.String fileName) |
void |
print(org.w3c.dom.Document document) |
protected void |
print(org.w3c.dom.Node node,
java.util.Map namespaces,
boolean endWithComma) |
protected void |
print(java.lang.String text) |
protected boolean |
printAttributes(org.w3c.dom.Element element) |
protected boolean |
printAttributeWithoutPrefix(org.w3c.dom.Attr attribute,
boolean hasAttribute) |
protected void |
printAttributeWithPrefix(org.w3c.dom.Attr attribute,
java.lang.StringBuffer buffer) |
protected void |
printChildren(org.w3c.dom.Node parent,
java.util.Map namespaces) |
protected void |
printComment(org.w3c.dom.Comment comment,
boolean endWithComma) |
protected void |
printElement(org.w3c.dom.Element element,
java.util.Map namespaces,
boolean endWithComma) |
protected void |
printEnd(java.lang.String text,
boolean endWithComma) |
protected void |
printIndent() |
protected void |
println(java.lang.String text) |
protected void |
printPI(org.w3c.dom.ProcessingInstruction instruction,
boolean endWithComma) |
protected void |
printQuoted(java.lang.String text) |
protected void |
printText(org.w3c.dom.Text node,
boolean endWithComma) |
protected IndentPrinter out
protected boolean inMixed
protected java.lang.String qt
protected java.util.Collection<java.lang.String> keywords
public DomToGroovy(java.io.PrintWriter out)
public DomToGroovy(IndentPrinter out)
public void print(org.w3c.dom.Document document)
public static void main(java.lang.String[] args)
protected static org.w3c.dom.Document parse(java.lang.String fileName) throws java.lang.Exception
java.lang.Exception
public static org.w3c.dom.Document parse(java.io.File file) throws java.lang.Exception
java.lang.Exception
public static org.w3c.dom.Document parse(java.io.Reader input) throws java.lang.Exception
java.lang.Exception
public static org.w3c.dom.Document parse(java.io.InputStream input) throws java.lang.Exception
java.lang.Exception
protected void print(org.w3c.dom.Node node, java.util.Map namespaces, boolean endWithComma)
protected void printElement(org.w3c.dom.Element element, java.util.Map namespaces, boolean endWithComma)
protected void printQuoted(java.lang.String text)
protected void printPI(org.w3c.dom.ProcessingInstruction instruction, boolean endWithComma)
protected void printComment(org.w3c.dom.Comment comment, boolean endWithComma)
protected void printText(org.w3c.dom.Text node, boolean endWithComma)
protected java.lang.String escapeQuote(java.lang.String text)
protected java.util.Map defineNamespaces(org.w3c.dom.Element element, java.util.Map namespaces)
protected void defineNamespace(java.util.Map namespaces, java.lang.String prefix, java.lang.String uri)
protected boolean printAttributes(org.w3c.dom.Element element)
protected void printAttributeWithPrefix(org.w3c.dom.Attr attribute, java.lang.StringBuffer buffer)
protected java.lang.String getAttributeValue(org.w3c.dom.Attr attribute)
protected boolean printAttributeWithoutPrefix(org.w3c.dom.Attr attribute, boolean hasAttribute)
protected boolean checkEscaping(java.lang.String localName)
protected java.lang.String getTextNodeData(org.w3c.dom.Text node)
protected boolean mixedContent(org.w3c.dom.NodeList list)
protected void printChildren(org.w3c.dom.Node parent, java.util.Map namespaces)
protected java.lang.String getLocalName(org.w3c.dom.Node node)
protected void printEnd(java.lang.String text, boolean endWithComma)
protected void println(java.lang.String text)
protected void print(java.lang.String text)
protected void printIndent()