Package mondrian.xmla

Interface SaxWriter

All Known Implementing Classes:
DefaultSaxWriter

public interface SaxWriter
SaxWriter is similar to a SAX ContentHandler which, perversely, converts its events into an output document.
Since:
27 April, 2003
Author:
jhyde, Gang Chen
  • Method Details

    • startDocument

      void startDocument()
    • endDocument

      void endDocument()
    • startElement

      void startElement(String name)
    • startElement

      void startElement(String name, Object... attrs)
    • endElement

      void endElement()
    • element

      void element(String name, Object... attrs)
    • characters

      void characters(String data)
    • startSequence

      void startSequence(String name, String subName)
      Informs the writer that a sequence of elements of the same name is starting.

      For XML, is equivalent to startElement(name).

      For JSON, initiates the array construct:

      "name" : [
        { ... },
        { ... }
      ]
      Parameters:
      name - Element name
      subName - Child element name
    • endSequence

      void endSequence()
      Informs the writer that a sequence of elements of the same name has ended.
    • textElement

      void textElement(String name, Object data)
      Generates a text-only element, <name>data</name>.

      For XML, this is equivalent to

      startElement(name);
      characters(data);
      endElement();
      but for JSON, generates "name": "data".
      Parameters:
      name - Name of element
      data - Text content of element
    • completeBeforeElement

      void completeBeforeElement(String tagName)
    • verbatim

      void verbatim(String text)
      Sends a piece of text verbatim through the writer. It must be a piece of well-formed XML.
    • flush

      void flush()
      Flushes any unwritten output.