org.apache.commons.feedparser.sax
Class RSSFeedParser

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.apache.commons.feedparser.sax.RSSFeedParser
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class RSSFeedParser
extends DefaultHandler

Version:
$Id: RSSFeedParser.java 373622 2006-01-30 22:53:00Z mvdb $
Author:
Kevin A. Burton (burtonator)

Field Summary
 FeedParserListener listener
           
static int STRING_BUFFER_CAPACITY
           
 
Constructor Summary
RSSFeedParser()
          Create a new RSSFeedParser instance.
 
Method Summary
 void beginFeedElement()
          Method to call when we're finished processing this element but BEFORE processing of the next element in the chain.
 void characters(char[] ch, int start, int length)
           
 void endDocument()
           
 void endElement(String namespace, String local, String qName)
           
 void endFeedElement()
          Method to call when we're finished processing this element but AFTER processing of the next element in the chain.
 boolean getBoolean(String name)
           
 String getProperty(String name)
          Get the value of a string property we found whilewhile parsing
 void setIncludeContent(boolean includeContent)
          If true we include the RAW XML content from the parser.
 void setNext(org.apache.commons.feedparser.sax.BaseDefaultHandler next)
          Set the next template to process in this chain.
 void startDocument()
           
 void startElement(String namespace, String local, String qName, Attributes attributes)
           
 void startPrefixMapping(String prefix, String namespace)
          Keep track of namespaces.
 String toString()
          Return the value of character data forfor the element.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

listener

public FeedParserListener listener

STRING_BUFFER_CAPACITY

public static int STRING_BUFFER_CAPACITY
Constructor Detail

RSSFeedParser

public RSSFeedParser()
Create a new RSSFeedParser instance.

Method Detail

startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class DefaultHandler
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class DefaultHandler
Throws:
SAXException

setIncludeContent

public void setIncludeContent(boolean includeContent)
If true we include the RAW XML content from the parser.


setNext

public void setNext(org.apache.commons.feedparser.sax.BaseDefaultHandler next)
Set the next template to process in this chain.


toString

public String toString()
Return the value of character data forfor the element.

Overrides:
toString in class Object

getProperty

public String getProperty(String name)
Get the value of a string property we found whilewhile parsing


getBoolean

public boolean getBoolean(String name)

beginFeedElement

public void beginFeedElement()
                      throws FeedParserException
Method to call when we're finished processing this element but BEFORE processing of the next element in the chain.

Throws:
FeedParserException

endFeedElement

public void endFeedElement()
                    throws FeedParserException
Method to call when we're finished processing this element but AFTER processing of the next element in the chain.

Throws:
FeedParserException

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String namespace)
                        throws SAXException
Keep track of namespaces.

Specified by:
startPrefixMapping in interface ContentHandler
Overrides:
startPrefixMapping in class DefaultHandler
Throws:
SAXException

startElement

public void startElement(String namespace,
                         String local,
                         String qName,
                         Attributes attributes)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Throws:
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Specified by:
characters in interface ContentHandler
Overrides:
characters in class DefaultHandler
Throws:
SAXException

endElement

public void endElement(String namespace,
                       String local,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Throws:
SAXException


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.