我的源文件看起来像这样:XSLT,如何选择标签,基于另一个同级别标记的内容
<stuff>
<s>
<contents>
<code>503886</code>
<code>602806</code>
</contents>
...
</s>
<p>
<code>344196</code>
<export>true</export>
...
</p>
<!-- more 's' and 'p' tags -->
...
</stuff>
我需要遍历“S”,并选择那些 - 这里面“内容”标签有一个属于'p'的'代码',该代码具有export = true。
我一直在试图解决这个在过去的几个小时。 请分享一些想法。
问得好(+1)。查看我的答案以获取单行XPath解决方案。 :) – 2010-09-27 16:40:01