我想創建一個XPath
查詢,該查詢返回以下XML
的「作業」爲「Actor」,其「順序」介於「0」和「4」之間的演員。我發現很難創建一個同時執行這兩個操作的查詢。與屬性相關的XPath搜索
<cast>
<person name="David Silverman" character="" job="Director" order="0"/>
<person name="James L. Brooks" character="" job="Author" order="0"/>
<person name="Dan Castellaneta" character="Homer J. Simpson" job="Actor" order="0"/>
<person name="Julie Kavner" character="Marge Simpson" job="Actor" order="1"/>
<person name="Nancy Cartwright" character="Bart Simpson" job="Actor" order="2"/>
<person name="Yeardley Smith" character="Lisa Simpson" job="Actor" order="3"/>
<person name="Dan Castellaneta" character="Krusty the Clown" job="Actor" order="4"/>
<person name="Hank Azaria" character="Moe Szyslak" job="Actor" order="5"/>
<person name="Dan Castellaneta" character="Apu Nahasapeemapetilon" job="Actor" order="6"/>
</cast>
謝謝我會試一試。 – RonanC 2011-03-04 09:21:45
這工作很簡單,我覺得很愚蠢。謝謝一堆。很好的幫助 – RonanC 2011-03-04 09:24:35