JAVA SAX パーサーでこのファイルを解析する際に問題が発生しました。
http://feeds.escapeartists.net/PodCastle_Main
ほとんどの場合、Exception: content is not allowed in prolog が発生します
Notepad++ でファイルを表示しました。プロローグは問題ありません。少なくともそう思います。
他の多くのポッドキャスト フィードが機能します。http://feeds.feedburner.com/newz-of-the-world
興味深いことに、ポッドキャッスル フィードは約 10% の成功率で動作します。
助言がありますか ?
br ユルゲン
編集: 興味深いことに、ファイルを手動でダウンロードし、自分の Web スペースにアップロードしました。- そこからはすべて順調です...奇妙です
EDIT2: コード
URL url = new URL(this.urlString);
_setProxy(); // Set the proxy if needed
urlInputStream = url.openConnection().getInputStream();
spf = SAXParserFactory.newInstance();
sp = spf.newSAXParser();
if ( urlInputStream == null) {
System.out.println("blub blub");
}
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8"));
System.out.println ("<<<<"+this.urlString+">>>> :" + in.readLine() );
System.out.println ("<<<<"+this.urlString+">>>> :" + in.readLine() );
in.close();
InputStream is = url.openStream();
try {
sp.parse(url.toURI().toString(), this);
} catch (SAXParseException e) {
System.err.println(e.getMessage());
}
出力:
<<<< ttp://feeds.escapeartists.net/PodCastle_Main>>>> : (印刷できない文字) <<<< ttp://feeds.escapeartists.net/PodCastle_Main>>>> : (印刷できない文字)
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 1 バイト UTF-8 シーケンスのバイト 1 が無効です。...
saxパーサーの同様の例外...
問題はサックスではなく、データ伝送です。約半分の時間で機能します。他のすべての testet .xml ファイルは機能します。
誰かこの効果を知っていますか?