cz.kebrt.html2latex
Class ParserHandler

java.lang.Object
  extended by cz.kebrt.html2latex.ParserHandler
All Implemented Interfaces:
IParserHandler

 class ParserHandler
extends java.lang.Object
implements IParserHandler

Handles events sent from the Parser class. Calls appropriate methods from the Convertor class.


Field Summary
private  Convertor _conv
          Convertor.
 
Constructor Summary
ParserHandler(java.io.File outputFile)
          Cstr.
 
Method Summary
 void comment(java.lang.String comment)
          Called when the comment is reached in input document.
 void endDocument()
          Called when the whole input document is read.
 void endElement(ElementEnd element, ElementStart elementStart)
          Called when an end element is reached in the input document.
 void characters(java.lang.String content)
          Called when the text content of an element is read.
 void startElement(ElementStart element)
          Called when a start element is reached in the input document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_conv

private Convertor _conv
Convertor.

Constructor Detail

ParserHandler

ParserHandler(java.io.File outputFile)
        throws FatalErrorException
Cstr.

Parameters:
outputFile - output LaTeX file
Throws:
FatalErrorException - fatal error (ie. output file can't be closed) occurs
Method Detail

startElement

public void startElement(ElementStart element)
Called when a start element is reached in the input document. Calls commonElementStart() for non-special elements and specials methods for the elements requiring special care (ie. tableRowStart() for <table>)

Specified by:
startElement in interface IParserHandler
Parameters:
element - start element reached

endElement

public void endElement(ElementEnd element,
                       ElementStart elementStart)
Called when an end element is reached in the input document. Calls commonElementEnd() for non-special elements and specials methods for the elements requiring special care (ie. tableRowEnd() for </table>)

Specified by:
endElement in interface IParserHandler
Parameters:
element - end element reached
elementStart - corresponding start element

characters

public void characters(java.lang.String content)
Called when the text content of an element is read. Calls characters() method of the Convertor class.

Specified by:
characters in interface IParserHandler
Parameters:
content - ie. "foo" for the "<b>foo</b>"

comment

public void comment(java.lang.String comment)
Called when the comment is reached in input document. Calls comment() method of the Convertor class.

Specified by:
comment in interface IParserHandler
Parameters:
comment - ie. "foo" for the "<!-->foo</-->"

endDocument

public void endDocument()
Called when the whole input document is read. Calls destroy() method of the Convertor class.

Specified by:
endDocument in interface IParserHandler