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 Summary
Modifier and TypeMethodDescriptionvoid
characters
(String data) void
completeBeforeElement
(String tagName) void
void
void
void
Informs the writer that a sequence of elements of the same name has ended.void
flush()
Flushes any unwritten output.void
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
Sends a piece of text verbatim through the writer.
-
Method Details
-
startDocument
void startDocument() -
endDocument
void endDocument() -
startElement
-
startElement
-
endElement
void endElement() -
element
-
characters
-
startSequence
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
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
-
verbatim
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.
-