fi.iki.hsivonen.xml
Class TitleGrabber

java.lang.Object
  extended by gnu.xml.pipeline.EventFilter
      extended by fi.iki.hsivonen.xml.TitleGrabber
All Implemented Interfaces:
gnu.xml.pipeline.EventConsumer, ContentHandler, DTDHandler, DeclHandler, LexicalHandler

public class TitleGrabber
extends gnu.xml.pipeline.EventFilter

Grabs the contents of the title element to be returned later.

Author:
taavi

Field Summary
private  boolean headOpen
           
private  StringBuilder title
           
private  boolean titleOpen
           
private static String XHTML_NS
          The XHTML namespace URI
 
Fields inherited from class gnu.xml.pipeline.EventFilter
DECL_HANDLER, FEATURE_URI, LEXICAL_HANDLER, PROPERTY_URI
 
Constructor Summary
TitleGrabber()
           
TitleGrabber(gnu.xml.pipeline.EventConsumer next)
           
 
Method Summary
 void characters(char[] arg0, int arg1, int arg2)
           
 void endElement(String uri, String local, String qname)
           
 String getTitle()
           
 void startElement(String uri, String local, String qname, Attributes attributes)
           
 
Methods inherited from class gnu.xml.pipeline.EventFilter
attributeDecl, bind, chainTo, comment, elementDecl, endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, externalEntityDecl, getContentHandler, getDocumentLocator, getDTDHandler, getErrorHandler, getNext, getProperty, ignorableWhitespace, internalEntityDecl, notationDecl, processingInstruction, setContentHandler, setDocumentLocator, setDTDHandler, setErrorHandler, setProperty, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XHTML_NS

private static final String XHTML_NS
The XHTML namespace URI

See Also:
Constant Field Values

title

private StringBuilder title

headOpen

private boolean headOpen

titleOpen

private boolean titleOpen
Constructor Detail

TitleGrabber

public TitleGrabber(gnu.xml.pipeline.EventConsumer next)

TitleGrabber

public TitleGrabber()
Method Detail

getTitle

public String getTitle()

endElement

public void endElement(String uri,
                       String local,
                       String qname)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class gnu.xml.pipeline.EventFilter
Throws:
SAXException

startElement

public void startElement(String uri,
                         String local,
                         String qname,
                         Attributes attributes)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class gnu.xml.pipeline.EventFilter
Throws:
SAXException

characters

public void characters(char[] arg0,
                       int arg1,
                       int arg2)
                throws SAXException
Specified by:
characters in interface ContentHandler
Overrides:
characters in class gnu.xml.pipeline.EventFilter
Throws:
SAXException