public class SaxAuthor extends Object
Modifier and Type | Field and Description |
---|---|
Attributes |
EMPTY_ATTRIBUTES |
protected FileOutputStream |
fos |
protected ContentHandler |
sax |
protected Stack<String> |
stack |
Constructor and Description |
---|
SaxAuthor() |
SaxAuthor(ContentHandler sax0)
Create a new instance with the given content handler as the target of all
generated sax events.
|
Modifier and Type | Method and Description |
---|---|
void |
CHARS(String text)
Output a SAX event representing the character data.
|
void |
CLOP(String... tags)
Close the elements with the given tags, one after the other, and then
open them again, backwards.
|
void |
close_fos()
Close the File Output Stream, if any had been employed.
|
void |
CLOSE_S(String... tags)
Close the elements with the given tags, one after the other, and
check whether they are really currently open.
|
void |
CLOSE()
Close the current top-level element, ie.
|
void |
CLOSE(int i)
Close the current top-level elements, ie.
|
void |
CLOSE(String tag)
Close one element with the given tags, check whether it is
really currently open.
|
void |
EMPTY(String tag)
Output tow SAX events, open and close, which correspond to an
empty element with the given tag.
|
void |
EMPTY(String tag,
String... pairs)
Output tow SAX events, open and close, which correspond to an
empty element with the given tag and the key/value pairs as attribute values.
|
void |
OPEN_S(String... tags)
Execute a sequence of "start element" sax calls on the given tag sequence,
and memoize all these elements as open.
|
void |
OPEN(String tag)
Execute a "start element" sax call on the receiver, and
memoize the element as open.
|
void |
OPEN(String tag,
Attributes atts)
Execute a "start element" sax call on the receiver, and
memoize the element as open.
|
void |
OPEN(String tag,
String... pairs)
Perform a "start element" sax call with the tag and the collected
attribute/value pairs as attribute,
and memoize the element as open.
|
void |
SIMPLE(String tag,
String text)
Output a SAX event starting an element with the given tag, then output
the character data, then close the element immediately.
|
void |
SIMPLE(String tag,
String text,
String... pairs)
Output a SAX event starting an element with the given tag and
the key/value pairs as attributes, then output
the character data, then close the element immediately.
|
void |
SPACE()
Output a SAX event representing some whitespace character data.
|
protected ContentHandler sax
public final Attributes EMPTY_ATTRIBUTES
protected FileOutputStream fos
public SaxAuthor()
public SaxAuthor(ContentHandler sax0)
public void close_fos()
public void OPEN(String tag, Attributes atts)
public void OPEN(String tag)
public void OPEN_S(String... tags)
public void OPEN(String tag, String... pairs)
public void CLOSE_S(String... tags)
RuntimeException
- if tags do not match to the current situation.public void CLOP(String... tags)
RuntimeException
- if tags do not match to the current situation.public void CLOSE(String tag)
RuntimeException
- if tags do not match to the current situation.public void CLOSE()
RuntimeException
- if no element is open.public void CLOSE(int i)
i
- number of elements to close.RuntimeException
- if less elements are open than requested to close.public void CHARS(String text)
public void SPACE()
public void SIMPLE(String tag, String text)
public void SIMPLE(String tag, String text, String... pairs)
public void EMPTY(String tag)
see also the complete user documentation .