。テキストはただ一つのタグXML解析問題
<item>
<title>SMWRME: Internet per “Collaborare senza confini”. Soprattutto alla SMW di Roma, dal 7 all'11 febbraio. Ecco il terzo percorso. http://cot.ag/ewnJ4F</title>
<description>SMWRME: Internet per “Collaborare senza confini”. Soprattutto alla SMW di Roma, dal 7 all'11 febbraio. Ecco il terzo percorso. http://cot.ag/ewnJ4F</description>
<pubDate>Mon, 27 Dec 2010 20:05:01 +0000</pubDate>
<guid>http://twitter.com/SMWRME/statuses/19483914259140609</guid>
<link>http://twitter.com/SMWRME/statuses/19483914259140609</link>
<twitter:source><a href="http://cotweet.com/?utm_source=sp1" rel="nofollow">CoTweet</a></twitter:source>
<twitter:place/>
</item>
にある文字
その種類の前にトランク接続されているので、私は、文字列
document_Twitter.getElementsByTagName("title").item(2).getFirstChild().getNodeValue()
を呼び出すとき、私は、この動作は、Androidアプリケーションのためだけに起こるないことに気づきました。 同じコードがJavaアプリケーションで正常に動作します。 誰かが私を助けることができますか?
回答ありがとう、xmlファイルを確認しました – alessandro
@alessandroあなたの例のxmlでは、タイトルノードに子ノードがなく、テキストコンテンツしかありません。 getFirstChild呼び出しは、タイトルノードにnullを返す必要があります。 – DwB