I’m trying to parse some data that has every cell of a tabs in a <text /> node. I need to ignore nodes that start with the star character * as well as 4 nodes after it. Can this be done with xpath, or do I need to go about this in a different way?
EDIT: My XML looks like the following:
<page>
<text attr="123" attr2="1234">ROW 1 CELL 1</text>
<text attr="123" attr2="1234">ROW 1 CELL 2</text>
<text attr="123" attr2="1234">ROW 1 CELL 3</text>
<text attr="123" attr2="1234">ROW 1 CELL 4</text>
<text attr="123" attr2="1234">ROW 1 CELL 5</text>
<text attr="123" attr2="1234">* ROW 2 CELL 1</text>
<text attr="123" attr2="1234">ROW 2 CELL 2</text>
<text attr="123" attr2="1234">ROW 2 CELL 3</text>
<text attr="123" attr2="1234">ROW 2 CELL 4</text>
<text attr="123" attr2="1234">ROW 2 CELL 5</text>
<text attr="123" attr2="1234">ROW 3 CELL 1</text>
<text attr="123" attr2="1234">ROW 3 CELL 2</text>
<text attr="123" attr2="1234">ROW 3 CELL 3</text>
<text attr="123" attr2="1234">ROW 3 CELL 4</text>
<text attr="123" attr2="1234">ROW 3 CELL 5</text>
</page>
The following expression:
Selects the following against your input:
All of
ROW 2is skipped.The following expression is equivalent (by De Morgan’s laws):