【发布时间】:2015-05-07 08:00:00
【问题描述】:
应该很容易,但我不知道怎么做:
我有这样的身份证号码:
ID1000
我想得到这个:
<xf:instance id="etykiety_ID1000" xmlns="">
<sek>
<etykiety_ref>
<opt>
<item>dokument wymagany</item>
<value>1</value>
</opt>
<opt>
<item>dokument niewymagany</item>
<value>2</value>
</opt>
<opt>
<item>potwierdzenie sprawdzenia</item>
<value>3</value>
</opt>
</etykiety_ref>
</sek>
</xf:instance>
这也是:
<xf:bind id="ID1000"
nodeset="wnio:TrescDokumentu/wnio:Wartosc/wnio:ID1000" relevant="true()"/>
但不是这个:
<xf:instance id="etykiety_ID56" xmlns="">
<sek>
<etykiety_ref>
<opt>
<item>dokument wymagany</item>
<value>1</value>
</opt>
<opt>
<item>dokument niewymagany</item>
<value>2</value>
</opt>
<opt>
<item>potwierdzenie sprawdzenia</item>
<value>3</value>
</opt>
</etykiety_ref>
</sek>
</xf:instance>
换句话说,我想获取所有 ID1000 的出现以及里面的所有 artibutes 和东西。
对不起,如果我的问题是基础知识,我是初学者。
【问题讨论】:
-
使用 XPath (2.0)? "//*[@id[ends-wth(.,'ID1000')]]"