com.itextpdf.tool.xml.parser.io
Class ParserListenerWriter

java.lang.Object
  extended by com.itextpdf.tool.xml.parser.io.ParserListenerWriter
All Implemented Interfaces:
XMLParserListener

public class ParserListenerWriter
extends Object
implements XMLParserListener

Debugging util.

Author:
redlab_b

Constructor Summary
ParserListenerWriter(Appender writer)
          Construct a new ParserListenerWriter with the given appender and default formatted to true;
ParserListenerWriter(Appender writer, boolean formatted)
           
 
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 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParserListenerWriter

public ParserListenerWriter(Appender writer,
                            boolean formatted)
Parameters:
writer - the appender
formatted - true if output should be formatted

ParserListenerWriter

public ParserListenerWriter(Appender writer)
Construct a new ParserListenerWriter with the given appender and default formatted to true;

Parameters:
writer - the appender
Method Detail

unknownText

public void unknownText(String string)
Description copied from interface: XMLParserListener
Triggered for text found outside root tag.

Specified by:
unknownText in interface XMLParserListener
Parameters:
string - the text

startElement

public void startElement(String currentTag,
                         Map<String,String> attributes,
                         String ns)
Description copied from interface: XMLParserListener
Triggered on an opening tag.

Specified by:
startElement in interface XMLParserListener
Parameters:
currentTag - the tag of the element
attributes - the attributes found on the tag
ns - the namespace or empty String

endElement

public void endElement(String curentTag,
                       String ns)
Description copied from interface: XMLParserListener
Triggered on a closing tag.

Specified by:
endElement in interface XMLParserListener
Parameters:
curentTag - the tag
ns - the namespace or empty String

comment

public void comment(String comment)
Description copied from interface: XMLParserListener
Triggered for comments that are found.

Specified by:
comment in interface XMLParserListener
Parameters:
comment - the comment

init

public void init()
Description copied from interface: XMLParserListener
Triggered when parsing has started.

Specified by:
init in interface XMLParserListener

close

public void close()
Description copied from interface: XMLParserListener
Triggered when parsing is finished and the stream will be closed.

Specified by:
close in interface XMLParserListener

text

public void text(String text)
Description copied from interface: XMLParserListener
Called when text is encountered.

Specified by:
text in interface XMLParserListener
Parameters:
text - the text


Copyright © 2015. All Rights Reserved.