-1
情况我有以下数据作为示例中的一个XML文件:获取前置兄弟是在出席XSLT
<file name="path\to\file1\">
</file>
<file name="path\to\file2\">
<error line="10" message="This file has an error"/>
</file>
<file name="path\to\file3\">
</file>
<file name="path\to\file4\">
<error line="15" message="This file has an error too"/>
</file>
现在假设我是“文件4”的节点上。我想要得到第一个有兄弟姐妹的错误行,在这种情况下是“file2”,但是在真实的XML中,我不知道它的位置。
是否可以使用preceding-sibling
轴进行此检查?
在此先感谢。
那么这很简单..工作就像一个魅力,谢谢! –