Class 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
    • Field Detail

      • writer

        protected groovy.xml.streamingmarkupsupport.StreamingMarkupWriter writer
      • 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