Class ParserListenerWriter
java.lang.Object
com.itextpdf.tool.xml.parser.io.ParserListenerWriter
- All Implemented Interfaces:
XMLParserListener
Debugging util.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionParserListenerWriter(Appender writer) Construct a new ParserListenerWriter with the given appender and default formatted to true;ParserListenerWriter(Appender writer, boolean formatted) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Triggered when parsing is finished and the stream will be closed.voidTriggered for comments that are found.voidendElement(String curentTag, String ns) Triggered on a closing tag.voidinit()Triggered when parsing has started.voidTriggered on an opening tag.voidCalled when text is encountered.voidunknownText(String string) Triggered for text found outside root tag.
-
Field Details
-
writer
-
formatted
private final boolean formatted
-
-
Constructor Details
-
ParserListenerWriter
- Parameters:
writer- the appenderformatted- true if output should be formatted
-
ParserListenerWriter
Construct a new ParserListenerWriter with the given appender and default formatted to true;- Parameters:
writer- the appender
-
-
Method Details
-
unknownText
Description copied from interface:XMLParserListenerTriggered for text found outside root tag.- Specified by:
unknownTextin interfaceXMLParserListener- Parameters:
string- the text
-
startElement
Description copied from interface:XMLParserListenerTriggered on an opening tag.- Specified by:
startElementin interfaceXMLParserListener- Parameters:
currentTag- the tag of the elementattributes- the attributes found on the tagns- the namespace or empty String
-
endElement
Description copied from interface:XMLParserListenerTriggered on a closing tag.- Specified by:
endElementin interfaceXMLParserListener- Parameters:
curentTag- the tagns- the namespace or empty String
-
comment
Description copied from interface:XMLParserListenerTriggered for comments that are found.- Specified by:
commentin interfaceXMLParserListener- Parameters:
comment- the comment
-
init
public void init()Description copied from interface:XMLParserListenerTriggered when parsing has started.- Specified by:
initin interfaceXMLParserListener
-
close
public void close()Description copied from interface:XMLParserListenerTriggered when parsing is finished and the stream will be closed.- Specified by:
closein interfaceXMLParserListener
-
text
Description copied from interface:XMLParserListenerCalled when text is encountered.- Specified by:
textin interfaceXMLParserListener- Parameters:
text- the text
-