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