|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.tools.xml.DomToGroovy
public class DomToGroovy extends java.lang.Object
A SAX handler for turning XML into Groovy scripts
Field Summary | |
---|---|
protected boolean |
inMixed
|
protected java.util.Collection |
keywords
|
protected IndentPrinter |
out
|
protected java.lang.String |
qt
|
Constructor Summary | |
DomToGroovy(java.io.PrintWriter out)
|
|
DomToGroovy(IndentPrinter out)
|
Method Summary | |
---|---|
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(Node node)
|
protected java.lang.String
|
getTextNodeData(org.w3c.dom.Text node)
|
static void
|
main(java.lang.String[] args)
|
protected boolean
|
mixedContent(NodeList list)
|
protected static org.w3c.dom.Document
|
parse(java.lang.String fileName)
|
static org.w3c.dom.Document
|
parse(java.io.File file)
|
static org.w3c.dom.Document
|
parse(java.io.Reader input)
|
static org.w3c.dom.Document
|
parse(java.io.InputStream input)
|
void
|
print(org.w3c.dom.Document document)
|
protected void
|
print(Node node, java.util.Map namespaces, boolean endWithComma)
|
protected void
|
print(java.lang.String text)
|
protected void
|
printAttributeWithPrefix(org.w3c.dom.Attr attribute, java.lang.StringBuffer buffer)
|
protected boolean
|
printAttributeWithoutPrefix(org.w3c.dom.Attr attribute, boolean hasAttribute)
|
protected boolean
|
printAttributes(org.w3c.dom.Element element)
|
protected void
|
printChildren(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
|
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 void
|
println(java.lang.String text)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
protected boolean inMixed
protected java.util.Collection keywords
protected IndentPrinter out
protected java.lang.String qt
Constructor Detail |
---|
public DomToGroovy(java.io.PrintWriter out)
public DomToGroovy(IndentPrinter out)
Method Detail |
---|
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(Node node)
protected java.lang.String getTextNodeData(org.w3c.dom.Text node)
public static void main(java.lang.String[] args)
protected boolean mixedContent(NodeList list)
protected static org.w3c.dom.Document parse(java.lang.String fileName)
public static org.w3c.dom.Document parse(java.io.File file)
public static org.w3c.dom.Document parse(java.io.Reader input)
public static org.w3c.dom.Document parse(java.io.InputStream input)
public void print(org.w3c.dom.Document document)
protected void print(Node node, java.util.Map namespaces, boolean endWithComma)
protected void print(java.lang.String text)
protected void printAttributeWithPrefix(org.w3c.dom.Attr attribute, java.lang.StringBuffer buffer)
protected boolean printAttributeWithoutPrefix(org.w3c.dom.Attr attribute, boolean hasAttribute)
protected boolean printAttributes(org.w3c.dom.Element element)
protected void printChildren(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 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 void println(java.lang.String text)
Groovy Documentation