Package mondrian.xmla
Interface SaxWriter
-
- All Known Implementing Classes:
DefaultSaxWriter
public interface SaxWriterSaxWriteris similar to a SAXContentHandlerwhich, 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 voidcharacters(String data)voidcompleteBeforeElement(String tagName)voidelement(String name, Object... attrs)voidendDocument()voidendElement()voidendSequence()Informs the writer that a sequence of elements of the same name has ended.voidflush()Flushes any unwritten output.voidstartDocument()voidstartElement(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>.voidverbatim(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.
-
-