我有這個xml文件 - payload.xmljQuery的XML解析找到具有特定屬性的節點,而不loooping
<Remoting><Response>
<Controller id="c">
<Messages/>
<StructData name="Root">
<F name="@ErrorOccured"/>
<F name="@TransitionErrorOccurred"/>
<List name="DataList" aspect="Delete"/>
<List name="DataList" aspect="New">
<Item name="001">
<F name="CreationDateTime" >2012/04/26</F>
<F name="ProductDescription" />
</Item>
<Item name="01F">
<F name="CreationDateTime" >2012/08/09</F>
<F name="ProductDescription" >Smartphone 16GB</F>
</Item>
<Header name="@tableSize">316 </Header>
</List>
</StructData>
<Events>
<Event event="$Core" operation="$AddRow" path="/Root/DataList"/>
</Events>
</Controller>
</Response></Remoting>
我想提取與特定名稱和特定的屬性,eg.g如果一個節點我想提取
<Item name="001">
<F name="CreationDateTime" >2012/04/26</F>
<F name="ProductDescription" />
</Item>
有沒有辦法做到這一點的一種方式,而無需通過.find(「項目」)
例如所有元素循環我可以這樣做.find(「項目」) - >屬性名稱=「001」
感謝
太棒了。正是我在找什麼。謝謝。 – Tintin