|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.DefaultHandler org.apache.commons.digester.Digester org.apache.commons.digester.rss.RSSDigester
Implementation of org.apache.commons.digester.Digester designed to process input streams that conform to the Rich Site Summary DTD, version 0.91. For more information about this format, see the My Netscape site.
The default implementation object returned by calling
parse()
(an instance of
org.apache.commons.digester.rss.Channel
)
knows how to render itself in XML format via the render()
method. See the test main()
method below for an
example of using these classes.
Field Summary | |
protected java.lang.String |
channelClass
The fully qualified class name of the Channel
implementation class. |
protected boolean |
configured
Have we been configured yet? |
protected java.lang.String |
imageClass
The fully qualified class name of the Image
implementation class. |
protected java.lang.String |
itemClass
The fully qualified class name of the Item
implementation class. |
protected static java.lang.String[] |
registrations
The set of public identifiers, and corresponding resource names, for the versions of the DTDs that we know about. |
protected java.lang.String |
textInputClass
The fully qualified class name of the TextInput
implementation class. |
Fields inherited from class org.apache.commons.digester.Digester |
bodyText, bodyTexts, classLoader, entityResolver, entityValidator, errorHandler, factory, JAXP_SCHEMA_LANGUAGE, locator, log, match, matches, namespaceAware, namespaces, params, parser, publicId, reader, root, rules, saxLog, schemaLanguage, schemaLocation, stack, substitutor, useContextClassLoader, validating, W3C_XML_SCHEMA |
Constructor Summary | |
RSSDigester()
|
Method Summary | |
protected void |
configure()
Configure the parsing rules that will be used to process RSS input. |
java.lang.String |
getChannelClass()
|
java.lang.String |
getImageClass()
|
java.lang.String |
getItemClass()
|
java.lang.String |
getTextInputClass()
|
static void |
main(java.lang.String[] args)
Test main program that parses the channel description included in this package as a static resource. |
java.lang.Object |
parse(java.io.File file)
Parse the content of the specified file using this Digester. |
java.lang.Object |
parse(org.xml.sax.InputSource input)
Parse the content of the specified input source using this Digester. |
java.lang.Object |
parse(java.io.InputStream input)
Parse the content of the specified input stream using this Digester. |
java.lang.Object |
parse(java.lang.String uri)
Parse the content of the specified URI using this Digester. |
void |
setChannelClass(java.lang.String channelClass)
|
void |
setImageClass(java.lang.String imageClass)
|
void |
setItemClass(java.lang.String itemClass)
|
void |
setTextInputClass(java.lang.String textInputClass)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean configured
protected static final java.lang.String[] registrations
protected java.lang.String channelClass
Channel
implementation class.
protected java.lang.String imageClass
Image
implementation class.
protected java.lang.String itemClass
Item
implementation class.
protected java.lang.String textInputClass
TextInput
implementation class.
Constructor Detail |
public RSSDigester()
Method Detail |
public java.lang.String getChannelClass()
public void setChannelClass(java.lang.String channelClass)
public java.lang.String getImageClass()
public void setImageClass(java.lang.String imageClass)
public java.lang.String getItemClass()
public void setItemClass(java.lang.String itemClass)
public java.lang.String getTextInputClass()
public void setTextInputClass(java.lang.String textInputClass)
public java.lang.Object parse(java.io.File file) throws java.io.IOException, org.xml.sax.SAXException
parse
in class Digester
file
- File containing the XML data to be parsed
java.io.IOException
- if an input/output error occurs
org.xml.sax.SAXException
- if a parsing exception occurspublic java.lang.Object parse(org.xml.sax.InputSource input) throws java.io.IOException, org.xml.sax.SAXException
parse
in class Digester
input
- Input source containing the XML data to be parsed
java.io.IOException
- if an input/output error occurs
org.xml.sax.SAXException
- if a parsing exception occurspublic java.lang.Object parse(java.io.InputStream input) throws java.io.IOException, org.xml.sax.SAXException
parse
in class Digester
input
- Input stream containing the XML data to be parsed
java.io.IOException
- if an input/output error occurs
org.xml.sax.SAXException
- if a parsing exception occurspublic java.lang.Object parse(java.lang.String uri) throws java.io.IOException, org.xml.sax.SAXException
parse
in class Digester
uri
- URI containing the XML data to be parsed
java.io.IOException
- if an input/output error occurs
org.xml.sax.SAXException
- if a parsing exception occursprotected void configure()
configure
in class Digester
public static void main(java.lang.String[] args)
args
- The command line arguments (ignored)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |