質問

I am currently looking to integrate VTD-XML in to our project (as a replacement of a Stax based system).

Our xml files are mostly structured like this:

<header>
  <entry1 timestamp="0"/>
  <entry2 timestamp="1"/>
  <entry1 timestamp="2"/>
  <entry2 timestamp="3"/>
</header>

Is there a way to get VTD-XML to recognize that the timestamps are strictly ordered and to abort a xpath query like /header/*[@timestamp < 2] early?

役に立ちましたか?

解決

not that i'm aware of. But you could select the last node:

/header/*[@timestamp = 2]

and then use selectPrecedingNode()

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top