: Class RSSHandler


com.exploringxml.rss
Class RSSHandler

com.exploringxml.rss.RSSHandler

public class RSSHandler

Receives the callback events from the XML parser and populates the associated RSSChannel object with the retrieved data

currently depends on the Aelfred XML parser


Field Summary
(package private)  boolean addedLink
           
(package private)  boolean addedTitle
           
(package private)  RSSChannel channel
           
(package private)  int itemCounter
           
(package private)  boolean readingChannel
           
(package private)  boolean readingDescription
           
(package private)  boolean readingImage
           
(package private)  boolean readingItem
           
(package private)  boolean readingLink
           
(package private)  boolean readingTitle
           
(package private)  boolean readingURL
           
 
Constructor Summary
RSSHandler(RSSChannel channel)
          creates a handler to populate a specific RSSChannel
 
Method Summary
 void charData(char[] chars, int from, int to)
          gets called by the XML parser when character data was encountered
 void endElement(java.lang.String tag)
          gets called by the XML parser when an XML end tag was encountered
 void startElement(java.lang.String tag)
          gets called by the XML parser when an XML start tag was encountered
 

Field Detail

channel

RSSChannel channel

readingChannel

boolean readingChannel

readingImage

boolean readingImage

readingItem

boolean readingItem

readingTitle

boolean readingTitle

readingLink

boolean readingLink

readingDescription

boolean readingDescription

readingURL

boolean readingURL

addedTitle

boolean addedTitle

addedLink

boolean addedLink

itemCounter

int itemCounter
Constructor Detail

RSSHandler

public RSSHandler(RSSChannel channel)
creates a handler to populate a specific RSSChannel
Parameters:
channel - the RSSChannel to populate with parsed data
Method Detail

startElement

public void startElement(java.lang.String tag)
                  throws java.lang.Exception
gets called by the XML parser when an XML start tag was encountered
Parameters:
tag - the String that was parsed as a start tag

endElement

public void endElement(java.lang.String tag)
                throws java.lang.Exception
gets called by the XML parser when an XML end tag was encountered
Parameters:
tag - the String that was parsed as an end tag

charData

public void charData(char[] chars,
                     int from,
                     int to)
              throws java.lang.Exception
gets called by the XML parser when character data was encountered
Parameters:
chars - the characters that were parsed
from - the start position of the characters within the array
to - the end position of the characters within the array