public class RSSDigester extends Digester
Implementation of org.apache.commons.digester3.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.digester3.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.
Modifier and Type | Field and Description |
---|---|
protected String |
channelClass
The fully qualified class name of the
Channel
implementation class. |
protected boolean |
configured
Have we been configured yet?
|
protected String |
imageClass
The fully qualified class name of the
Image
implementation class. |
protected String |
itemClass
The fully qualified class name of the
Item
implementation class. |
protected String |
textInputClass
The fully qualified class name of the
TextInput
implementation class. |
inputSources, W3C_XML_SCHEMA
Constructor and Description |
---|
RSSDigester() |
Modifier and Type | Method and Description |
---|---|
protected void |
configure()
Configure the parsing rules that will be used to process RSS input.
|
String |
getChannelClass() |
String |
getImageClass() |
String |
getItemClass() |
String |
getTextInputClass() |
static void |
main(String[] args)
Test main program that parses the channel description included in this
package as a static resource.
|
<T> T |
parse(File file)
Parse the content of the specified file using this Digester.
|
<T> T |
parse(InputSource input)
Parse the content of the specified input source using this Digester.
|
<T> T |
parse(InputStream input)
Parse the content of the specified input stream using this Digester.
|
<T> T |
parse(String uri)
Parse the content of the specified URI using this Digester.
|
void |
setChannelClass(String channelClass) |
void |
setImageClass(String imageClass) |
void |
setItemClass(String itemClass) |
void |
setTextInputClass(String textInputClass) |
addBeanPropertySetter, addBeanPropertySetter, addCallMethod, addCallMethod, addCallMethod, addCallMethod, addCallParam, addCallParam, addCallParam, addCallParam, addCallParamPath, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addFactoryCreate, addObjectCreate, addObjectCreate, addObjectCreate, addObjectCreate, addObjectParam, addRule, addRuleSet, addSetNestedProperties, addSetNestedProperties, addSetNestedProperties, addSetNext, addSetNext, addSetProperties, addSetProperties, addSetProperties, addSetProperty, addSetRoot, addSetRoot, addSetTop, addSetTop, asyncParse, asyncParse, asyncParse, asyncParse, asyncParse, asyncParse, characters, cleanup, clear, createInputSourceFromURL, createInputSourceFromURL, createSAXException, createSAXException, createSAXException, endDocument, endElement, endPrefixMapping, error, fatalError, findNamespaceURI, getClassLoader, getCount, getCurrentElementName, getCurrentNamespaces, getCustomContentHandler, getDocumentLocator, getEntityResolver, getErrorHandler, getExecutorService, getFactory, getFeature, getLogger, getMatch, getMatches, getNamespaceAware, getParser, getProperty, getPublicId, getRoot, getRuleNamespaceURI, getRules, getSAXLogger, getStackAction, getSubstitutor, getUseContextClassLoader, getValidating, getXIncludeAware, getXMLReader, getXMLSchema, ignorableWhitespace, initialize, isConfigured, isEmpty, notationDecl, parse, parse, peek, peek, peek, peek, peekParams, peekParams, pop, pop, popParams, processingInstruction, push, push, pushParams, register, register, registerAll, resetRoot, resolveEntity, setClassLoader, setCustomContentHandler, setDocumentLocator, setEntityResolver, setErrorHandler, setExecutorService, setFeature, setLogger, setNamespaceAware, setProperty, setPublicId, setRuleNamespaceURI, setRules, setSAXLogger, setStackAction, setSubstitutor, setUseContextClassLoader, setValidating, setXIncludeAware, setXMLSchema, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
protected boolean configured
protected String channelClass
Channel
implementation class.protected String imageClass
Image
implementation class.protected String itemClass
Item
implementation class.protected String textInputClass
TextInput
implementation class.public RSSDigester()
public String getChannelClass()
public void setChannelClass(String channelClass)
public String getImageClass()
public void setImageClass(String imageClass)
public String getItemClass()
public void setItemClass(String itemClass)
public String getTextInputClass()
public void setTextInputClass(String textInputClass)
public <T> T parse(File file) throws IOException, SAXException
parse
in class Digester
T
- the type used to auto-cast the returned object to the assigned variable typefile
- File containing the XML data to be parsedIOException
- if an input/output error occursSAXException
- if a parsing exception occurspublic <T> T parse(InputSource input) throws IOException, SAXException
parse
in class Digester
T
- the type used to auto-cast the returned object to the assigned variable typeinput
- Input source containing the XML data to be parsedIOException
- if an input/output error occursSAXException
- if a parsing exception occurspublic <T> T parse(InputStream input) throws IOException, SAXException
parse
in class Digester
T
- the type used to auto-cast the returned object to the assigned variable typeinput
- Input stream containing the XML data to be parsedIOException
- if an input/output error occursSAXException
- if a parsing exception occurspublic <T> T parse(String uri) throws IOException, SAXException
parse
in class Digester
T
- the type used to auto-cast the returned object to the assigned variable typeuri
- URI containing the XML data to be parsedIOException
- if an input/output error occursSAXException
- if a parsing exception occursprotected void configure()
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.