0
我建立一個Android應用程序,並利用圖書館jsoup,我解析HTML,但不知道如何從我的HTML得到物品的Android Jsoup獲得價值
的HTML:
<div id="polls-687" class="wp-polls">
<form id="polls_form_687" class="wp-polls-form" action="/myurl" method="post">
<p style="display: none;">
<input type="hidden" id="poll_687_nonce" name="wp-polls-nonce" value="6490c2e4b0" />
</p>
<p style="display: none;">
<input type="hidden" name="poll_id" value="687" />
</p>
<h4>What do you want to hear?</h4>
<div id="polls-687-ans" class="wp-polls-ans">
<ul class="wp-polls-ul" style="padding-left:0px;">
<li>
<input type="radio" id="poll-answer-2605" name="poll_687" value="2605" />
<label for="poll-answer-2605">Cappella - U & Me</label>
</li>
<li>
<input type="radio" id="poll-answer-2607" name="poll_687" value="2607" />
<label for="poll-answer-2607">Deepest Blue - Deepest Blue</label>
</li>
<li>
<input type="radio" id="poll-answer-2609" name="poll_687" value="2609" />
<label for="poll-answer-2609">Britney Spears - (Hit Me Baby) One More Time</label>
</li>
<li>
<input type="radio" id="poll-answer-2611" name="poll_687" value="2611" />
<label for="poll-answer-2611">Drukwerk - Marianneke</label>
</li>
</ul>
<p style="text-align: left;">
<input type="button" name="vote" value=" Stem op deze plaat " class="Buttons" onclick="poll_vote(687);" />
</p>
<p style="text-align: left;">
</p>
</div>
</form>
</div>
我需要獲取li標籤之間的標籤。還有輸入標籤的值。我已使用此鏈接http://jsoup.org/cookbook/extracting-data/attributes-text-html但我不知道如何獲得我需要的特定項目。有人有Jsoup的經驗,給我一些建議或例子嗎?
感謝名單的人!完美的答案! – ddnl