org.jperdian.rss2
Class RssParser

java.lang.Object
  |
  +--org.jperdian.rss2.RssParser

public class RssParser
extends java.lang.Object

The parser to process an XML document and transfer it into an RssMessage

Author:
Christian Robert

Constructor Summary
RssParser()
           
 
Method Summary
protected  javax.xml.parsers.DocumentBuilder getDocumentBuilder()
          Gets the DocumentBuilder used for XML parsing
 RssChannel parse(org.w3c.dom.Document xmlDocument, RssChannel targetChannel)
          Transfers the given XML document into a value RssMessage object
 RssChannel parse(java.net.URL sourceURL, RssChannel targetChannel)
          Transfers the given XML document into a value RssMessage object
protected  RssChannel parseChannel(org.w3c.dom.Element channelElement, RssChannel channel)
          Parses the content of the given channel element, analyze it's content and generate a valid RssChannel object
protected  RssCloud parseCloud(org.w3c.dom.Element cloudElement)
          Parses a cloud element
protected  RssEnclosure parseEnclosure(org.w3c.dom.Element enclosureElement)
          Parses a enclosure element
protected  RssGuid parseGuid(org.w3c.dom.Element guidElement)
          Parses a guid element
protected  RssImage parseImage(org.w3c.dom.Element textInputElement)
          Parses a image element
protected  RssItem parseItem(org.w3c.dom.Element itemElement)
          Parses a item element
protected  RssTextInput parseTextInput(org.w3c.dom.Element textInputElement)
          Parses a textInput element
protected  void setDocumentBuilder(javax.xml.parsers.DocumentBuilder builder)
          Sets the DocumentBuilder used for XML parsing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RssParser

public RssParser()
Method Detail

parse

public RssChannel parse(java.net.URL sourceURL,
                        RssChannel targetChannel)
                 throws RssException
Transfers the given XML document into a value RssMessage object

RssException

parse

public RssChannel parse(org.w3c.dom.Document xmlDocument,
                        RssChannel targetChannel)
                 throws RssParseException
Transfers the given XML document into a value RssMessage object

RssParseException

parseChannel

protected RssChannel parseChannel(org.w3c.dom.Element channelElement,
                                  RssChannel channel)
                           throws RssParseException
Parses the content of the given channel element, analyze it's content and generate a valid RssChannel object

RssParseException

parseCloud

protected RssCloud parseCloud(org.w3c.dom.Element cloudElement)
                       throws RssParseException
Parses a cloud element

RssParseException

parseTextInput

protected RssTextInput parseTextInput(org.w3c.dom.Element textInputElement)
                               throws RssParseException
Parses a textInput element

RssParseException

parseImage

protected RssImage parseImage(org.w3c.dom.Element textInputElement)
                       throws RssParseException
Parses a image element

RssParseException

parseItem

protected RssItem parseItem(org.w3c.dom.Element itemElement)
                     throws RssParseException
Parses a item element

RssParseException

parseEnclosure

protected RssEnclosure parseEnclosure(org.w3c.dom.Element enclosureElement)
                               throws RssParseException
Parses a enclosure element

RssParseException

parseGuid

protected RssGuid parseGuid(org.w3c.dom.Element guidElement)
                     throws RssParseException
Parses a guid element

RssParseException

setDocumentBuilder

protected void setDocumentBuilder(javax.xml.parsers.DocumentBuilder builder)
Sets the DocumentBuilder used for XML parsing


getDocumentBuilder

protected javax.xml.parsers.DocumentBuilder getDocumentBuilder()
Gets the DocumentBuilder used for XML parsing