Package mondrian.xmla
Interface SaxWriter
-
- All Known Implementing Classes:
DefaultSaxWriter
public interface SaxWriter
SaxWriter
is similar to a SAXContentHandler
which, perversely, converts its events into an output document.- Since:
- 27 April, 2003
- Author:
- jhyde, Gang Chen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
characters(String data)
void
completeBeforeElement(String tagName)
void
element(String name, Object... attrs)
void
endDocument()
void
endElement()
void
endSequence()
Informs the writer that a sequence of elements of the same name has ended.void
flush()
Flushes any unwritten output.void
startDocument()
void
startElement(String name)
void
startElement(String name, Object... attrs)
void
startSequence(String name, String subName)
Informs the writer that a sequence of elements of the same name is starting.void
textElement(String name, Object data)
Generates a text-only element,<name>data</name>
.void
verbatim(String text)
Sends a piece of text verbatim through the writer.
-
-
-
Method Detail
-
startDocument
void startDocument()
-
endDocument
void endDocument()
-
startElement
void startElement(String name)
-
endElement
void endElement()
-
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 namesubName
- 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
but for JSON, generatesstartElement(name);
characters(data);
endElement();"name": "data"
.- Parameters:
name
- Name of elementdata
- 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.
-
-