YQLが提供するYahoo Query Languageとxpath機能を使ってhtmlを解析しようとしているときに、「text()」や属性値を抽出できないという問題がありました。
perma linkYahoo YQLを使ってhtmlを照会
select * from html where url="http://stackoverflow.com"
and xpath='//div/h3/a'
私は
select * from html where url="http://stackoverflow.com"
and xpath='//div/h3/a/text()'
を使用してノードの値を抽出しようとすると、今、私は結果が連結ではなく、取得したXML
<results>
<a class="question-hyperlink" href="https://stackoverflow.com/questions/661184/filling-the-text-area-with-the-text-when-a-button-is-clicked" title="In ASP.net, I need the code to fill the text area (in the form) when a button is clicked. Can you help me through by showing a simple .aspx code containing the script tag? ">Filling the text area with the text when a button is clicked</a>...
</results>
としてアンカーのリストを与えますノードリスト
<results>Xcode: attaching to a remote process for debuggingWhy is b
…… </results>
どのようにしてノードリストに分離んし、どのように私は属性が値選択のですか?
この
select * from html where url="http://stackoverflow.com"
and xpath='//div/h3/a[@href]'
のようなクエリがdiv/h3/a
魅力的な作品です! – Cherian