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 TypeMethodDescriptionvoidcharacters(String data) voidcompleteBeforeElement(String tagName) voidvoidvoidvoidInforms the writer that a sequence of elements of the same name has ended.voidflush()Flushes any unwritten output.voidvoidstartElement(String name) voidstartElement(String name, Object... attrs) voidstartSequence(String name, String subName) Informs the writer that a sequence of elements of the same name is starting.voidtextElement(String name, Object data) Generates a text-only element,<name>data</name>.voidSends 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.
-