|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.news.NewsXMLParser
public class NewsXMLParser
Parse out the news.xml file which is in Atom format (RFC4287). We use the XML parser from the UPnP library.
Nested Class Summary | |
---|---|
static class |
NewsXMLParser.XHTMLMode
The action taken when encountering a non-whitelisted XHTML element or blacklisted attribute in the feed content. |
Constructor Summary | |
---|---|
NewsXMLParser(I2PAppContext ctx)
|
Method Summary | |
---|---|
List<NewsEntry> |
getEntries()
The news entries. |
NewsMetadata |
getMetadata()
The news metatdata. |
static void |
main(String[] args)
|
void |
parse(File file)
Process the XML file. |
void |
parse(InputStream in)
Process the XML input stream. |
void |
setXHTMLMode(NewsXMLParser.XHTMLMode mode)
Sets the action taken when encountering a non-whitelisted XHTML element in the feed content. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NewsXMLParser(I2PAppContext ctx)
Method Detail |
---|
public void setXHTMLMode(NewsXMLParser.XHTMLMode mode)
public void parse(File file) throws IOException
file
- XML content only. Any su3 or gunzip handling must have
already happened.
IOException
- on any parse errorpublic void parse(InputStream in) throws IOException
in
- XML content only. Any su3 or gunzip handling must have
already happened.
IOException
- on any parse errorpublic List<NewsEntry> getEntries()
public NewsMetadata getMetadata()
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |