public class ParserListenerWriter extends Object implements XMLParserListener
| Constructor and Description |
|---|
ParserListenerWriter(Appender writer)
Construct a new ParserListenerWriter with the given appender and default formatted to true;
|
ParserListenerWriter(Appender writer,
boolean formatted) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Triggered when parsing is finished and the stream will be closed.
|
void |
comment(String comment)
Triggered for comments that are found.
|
void |
endElement(String curentTag,
String ns)
Triggered on a closing tag.
|
void |
init()
Triggered when parsing has started.
|
void |
startElement(String currentTag,
Map<String,String> attributes,
String ns)
Triggered on an opening tag.
|
void |
text(String text)
Called when text is encountered.
|
void |
unknownText(String string)
Triggered for text found outside root tag.
|
public ParserListenerWriter(Appender writer, boolean formatted)
writer - the appenderformatted - true if output should be formattedpublic ParserListenerWriter(Appender writer)
writer - the appenderpublic void unknownText(String string)
XMLParserListenerunknownText in interface XMLParserListenerstring - the textpublic void startElement(String currentTag, Map<String,String> attributes, String ns)
XMLParserListenerstartElement in interface XMLParserListenercurrentTag - the tag of the elementattributes - the attributes found on the tagns - the namespace or empty Stringpublic void endElement(String curentTag, String ns)
XMLParserListenerendElement in interface XMLParserListenercurentTag - the tagns - the namespace or empty Stringpublic void comment(String comment)
XMLParserListenercomment in interface XMLParserListenercomment - the commentpublic void init()
XMLParserListenerinit in interface XMLParserListenerpublic void close()
XMLParserListenerclose in interface XMLParserListenerpublic void text(String text)
XMLParserListenertext in interface XMLParserListenertext - the textCopyright © 2020. All rights reserved.