Package com.itextpdf.tool.xml.parser
Interface XMLParserListener
-
- All Known Implementing Classes:
ParserListenerWriter
,XMLWorker
public interface XMLParserListener
Can be added to theXMLParser
to receive events.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Triggered when parsing is finished and the stream will be closed.void
comment(java.lang.String comment)
Triggered for comments that are found.void
endElement(java.lang.String tag, java.lang.String ns)
Triggered on a closing tag.void
init()
Triggered when parsing has started.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.void
text(java.lang.String text)
Called when text is encountered.void
unknownText(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
-
-