从<响应>中提取

时间:2019-04-11 06:40:22

标签: html dom

我有一个URL,它是类似于以下内容的XML响应数据。我在Excel中使用VBA。我想提取“ 102196”,它位于数据的底部,但是不起作用。

代码:

With Http
    .Open "GET", URL, False
    .send
    Html.body.innerHTML = .responseText
End With

On Error Resume Next
add = Html.querySelector("zestimate").getAttribute("amount")

XML:

<response>
  <results>
    <result>
      <zpid>154607080</zpid>
      <links>
        <homedetails>
https://www.zillow.com/homedetails/2912-W-1st-St-APT-1-Jacksonville-FL-32254/154607080_zpid/
</homedetails>
        <graphsanddata>
http://www.zillow.com/homedetails/2912-W-1st-St-APT-1-Jacksonville-FL-32254/154607080_zpid/#charts-and-data
</graphsanddata>
        <mapthishome>http://www.zillow.com/homes/154607080_zpid/</mapthishome>
        <comparables>http://www.zillow.com/homes/comps/154607080_zpid/</comparables>
      </links>
      <address>
        <street>2912 W 1st St APT 1</street>
        <zipcode>32254</zipcode>
        <city>Jacksonville</city>
        <state>FL</state>
        <latitude>30.339737</latitude>
        <longitude>-81.716677</longitude>
      </address>
      <zestimate>
        <amount currency="USD">102196</amount>

0 个答案:

没有答案
相关问题