使用java读取rss feed的问题

时间:2021-12-18 00:59:42

Hie

I tried to follow vogella

我试着跟随沃格拉

and when i use a rss feed it throws following exception:

当我使用rss feed时会抛出以下异常:

Exception in thread "main" java.lang.RuntimeException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,50]
Message: White spaces are required between publicId and systemId.
    at vik.tools.changeNotifier.RSSFeedParser.readFeed(RSSFeedParser.java:131)
    at vik.tools.changeNotifier.ReadTest.main(ReadTest.java:6)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,50]
Message: White spaces are required between publicId and systemId.
    at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:594)
    at com.sun.xml.internal.stream.XMLEventReaderImpl.nextEvent(XMLEventReaderImpl.java:85)
    at vik.tools.changeNotifier.RSSFeedParser.readFeed(RSSFeedParser.java:61)

Any advise on this please..

有任何建议请...

2 个解决方案

#1


0  

because this is not a rss page. it's an html page. a css page would be, for example, http://www.vogella.de/article.rss .

因为这不是rss页面。这是一个HTML页面。例如,http://www.vogella.de/article.rss就是一个css页面。

#2


0  

ok looks like issue was with rss url itself. i tested with other frameworks and rss reader codes and i got the same issue.

好像看起来问题与rss网址本身。我测试了其他框架和rss阅读器代码,我遇到了同样的问题。

#1


0  

because this is not a rss page. it's an html page. a css page would be, for example, http://www.vogella.de/article.rss .

因为这不是rss页面。这是一个HTML页面。例如,http://www.vogella.de/article.rss就是一个css页面。

#2


0  

ok looks like issue was with rss url itself. i tested with other frameworks and rss reader codes and i got the same issue.

好像看起来问题与rss网址本身。我测试了其他框架和rss阅读器代码,我遇到了同样的问题。