org.codehaus.groovy.grails.web.xml
Class XMLStreamWriter

java.lang.Object
  extended by org.codehaus.groovy.grails.web.xml.XMLStreamWriter
Direct Known Subclasses:
PrettyPrintXMLStreamWriter

public class XMLStreamWriter
extends java.lang.Object

A simple XML Stream Writer that leverages the StreamingMarkupWriter of Groovy

Since:
1.1

Nested Class Summary
protected static class XMLStreamWriter.Mode
           
 
Field Summary
protected  XMLStreamWriter.Mode mode
           
protected  java.util.Stack<java.lang.String> tagStack
           
protected  groovy.xml.streamingmarkupsupport.StreamingMarkupWriter writer
           
 
Constructor Summary
XMLStreamWriter(groovy.xml.streamingmarkupsupport.StreamingMarkupWriter writer)
           
 
Method Summary
 XMLStreamWriter attribute(java.lang.String name, java.lang.String value)
           
 XMLStreamWriter characters(java.lang.String data)
           
 XMLStreamWriter end()
           
protected  void endStartTag()
           
 XMLStreamWriter startDocument(java.lang.String encoding, java.lang.String version)
           
 XMLStreamWriter startNode(java.lang.String tag)
           
protected  void startTag()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writer

protected groovy.xml.streamingmarkupsupport.StreamingMarkupWriter writer

mode

protected XMLStreamWriter.Mode mode

tagStack

protected java.util.Stack<java.lang.String> tagStack
Constructor Detail

XMLStreamWriter

public XMLStreamWriter(groovy.xml.streamingmarkupsupport.StreamingMarkupWriter writer)
Method Detail

startDocument

public XMLStreamWriter startDocument(java.lang.String encoding,
                                     java.lang.String version)
                              throws java.io.IOException
Throws:
java.io.IOException

startTag

protected void startTag()
                 throws java.io.IOException
Throws:
java.io.IOException

startNode

public XMLStreamWriter startNode(java.lang.String tag)
                          throws java.io.IOException
Throws:
java.io.IOException

end

public XMLStreamWriter end()
                    throws java.io.IOException
Throws:
java.io.IOException

attribute

public XMLStreamWriter attribute(java.lang.String name,
                                 java.lang.String value)
                          throws java.io.IOException
Throws:
java.io.IOException

endStartTag

protected void endStartTag()
                    throws java.io.IOException
Throws:
java.io.IOException

characters

public XMLStreamWriter characters(java.lang.String data)
                           throws java.io.IOException
Throws:
java.io.IOException