Package com.itextpdf.tool.xml.parser
Interface XMLParserListener
-
- All Known Implementing Classes:
ParserListenerWriter,XMLWorker
public interface XMLParserListenerCan be added to theXMLParserto receive events.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Triggered when parsing is finished and the stream will be closed.voidcomment(java.lang.String comment)Triggered for comments that are found.voidendElement(java.lang.String tag, java.lang.String ns)Triggered on a closing tag.voidinit()Triggered when parsing has started.voidstartElement(java.lang.String tag, java.util.Map<java.lang.String,java.lang.String> attributes, java.lang.String ns)Triggered on an opening tag.voidtext(java.lang.String text)Called when text is encountered.voidunknownText(java.lang.String text)Triggered for text found outside root tag.
-
-
-
Method Detail
-
startElement
void startElement(java.lang.String tag, java.util.Map<java.lang.String,java.lang.String> attributes, java.lang.String ns)Triggered on an opening tag.- Parameters:
tag- the tag of the elementattributes- the attributes found on the tagns- the namespace or empty String
-
endElement
void endElement(java.lang.String tag, java.lang.String ns)Triggered on a closing tag.- Parameters:
tag- the tagns- the namespace or empty String
-
unknownText
void unknownText(java.lang.String text)
Triggered for text found outside root tag.- Parameters:
text- the text
-
comment
void comment(java.lang.String comment)
Triggered for comments that are found.- Parameters:
comment- the comment
-
init
void init()
Triggered when parsing has started.
-
close
void close()
Triggered when parsing is finished and the stream will be closed.
-
text
void text(java.lang.String text)
Called when text is encountered.- Parameters:
text- the text
-
-