0

I have this sample XML:

<Values>
<TraceSet Name = "EVT1.Val" QuerySpecName="EVT1" >
<Events>
<Properties>
<Property Descriptor="100">1406538933</Property>
<Property Descriptor="2000">My second value</Property>
</Properties>
</Events>
<TraceSet Name = "EVT2.Val" QuerySpecName="EVT2" >
<Events>
<Properties>
<Property Descriptor="100">1406538922</Property>
<Property Descriptor="2000">My first value</Property>
</Properties>
</Events>
</Values>

I am trying to iterate at the Property Descriptor = 2000 level, sorting by Property Descriptor = 100 (UTC Seconds) but I can'[t find a way to do it in XPath 1.0.

The result should be:

My first value
My second value

Is there a way of comparing ALL UTC seconds in this structure and show the respective values in order?

4

1 回答 1

1

我正在尝试在 Property Descriptor = 2000 级别进行迭代,按 Property Descriptor = 100(UTC 秒)排序,但我无法在 XPath 1.0 中找到一种方法。

没有办法纯粹在 XPath 1.0 中进行,因为在 XPath 1.0 本身中没有排序和迭代的概念。XPath 表达式只是从源文档中选择节点集,这取决于执行 XPath 表达式的宿主语言来对所选节点进行任何迭代或排序。

于 2014-08-06T14:16:29.010 回答