使用 REST 查询服务器时,我收到以下信息:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<widgets>
  <widget>
    <wid>wid1007</wid>
    <path>widgets-1007</path>
    <name>Frobnutter</name>
    <id>1</id>
    <version>0</version>
  </widget>
  <widget>
    <wid>wid1008</wid>
    <path>widgets-1008</path>
    <name>Roberts-Coupler</name>
    <id>2</id>
    <version>0</version>
  </widget>
</widgets>
我需要使用“id”的已知值从“widget”中提取“wid”的值。这在 jQuery 中会是什么样子?
谢谢!