com.itextpdf.tool.xml.parser
Interface XMLParserListener

All Known Implementing Classes:
ParserListenerWriter, XMLWorker

public interface XMLParserListener

Can be added to the XMLParser to receive events.

Author:
redlab_b

Method Summary
 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 tag, String ns)
          Triggered on a closing tag.
 void init()
          Triggered when parsing has started.
 void startElement(String tag, Map<String,String> attributes, String ns)
          Triggered on an opening tag.
 void text(String text)
          Called when text is encountered.
 void unknownText(String text)
          Triggered for text found outside root tag.
 

Method Detail

startElement

void startElement(String tag,
                  Map<String,String> attributes,
                  String ns)
Triggered on an opening tag.

Parameters:
tag - the tag of the element
attributes - the attributes found on the tag
ns - the namespace or empty String

endElement

void endElement(String tag,
                String ns)
Triggered on a closing tag.

Parameters:
tag - the tag
ns - the namespace or empty String

unknownText

void unknownText(String text)
Triggered for text found outside root tag.

Parameters:
text - the text

comment

void comment(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(String text)
Called when text is encountered.

Parameters:
text - the text


Copyright © 2012. All Rights Reserved.