this pageによれば、私はこの権利を行っていると思います...または少なくとも私は思っています。DOM - ノードからのテキストの解析
私は、この解析したい:
<Title>Bananas</Title>
ここではいくつかのコードがあるし。
node1.getNodeName(); // returns "Title" *correct*
node2 = node1.getNextSibling();
node2.getNodeName(); // returns "#text" *correct*
node2.getNodeType() == Node.TEXT_NODE // returns true *correct*
node2.getNodeValue(); // returns "" *should return "Bananas"*
文書によると、テキスト・ノード上のGETNODEVALUE()への呼び出しは、そのテキスト値を返すべきではないのですか?あなたがテキストにアクセスしている
を、このラインを使用して何かをしたいした後、あなたは単純なXMLを見たことがありますか?それはすべてのAndroidのバージョンで動作します:http://simple.sourceforge.net/ –
これを試してください node2.getFirstChild()。getNodeValue(); – surendra