繁体   English   中英

如何检索选定节点在另一个节点集中的位置

[英]How to retrieve position of selected node in another node-set

<Form>
<Table>
<Row>
<Column></Column>
<Column></Column>
<Column></Column>
</Row>
<Row>
<Column id="xxx"></Column>
<Column></Column>
<Column></Column>
</Row>
<Row>
<Column></Column>
<Column></Column>
<Column></Column>
</Row>
</Table>
</Form>

如何在表中所有行的上下文中选择包含ID为“ xxx”的列的行的位置?

问: 如何在表的所有行的上下文中选择包含ID为“ xxx”的列的行的位置?

尝试:

 "count(Row[Column/@id = 'xxx']/preceding-sibling::Row) + 1"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM