0
我有以下XML:Xpath查詢以獲取父元素文本及其子元素屬性值?
<sample>
<Message number="2">
<Title>Program pointer has been reset</Title>
<Description>
The program pointer of task
<arg format="%s" ordinal="3" />
has been reset.
</Description>
</Message>
</sample>
我試圖讓與ARG屬性值能解密文本。像"The program pointer of task %s 3 has been reset."
和我嘗試的東西看起來像
'/sample//Message[@number = $mId]/Description'
,但沒有工作。
其工作........ thanx很多人....其實我即將使用pydom xpath 0.1 lib ..可以請你提供一些鏈接,以瞭解更多關於如何使用xpath查詢...再thanx您的幫助..:-) – Ashishkumar 2011-12-14 13:47:08