Hi All,
I have an xml that contains two groups of related values:
<Rows>
<!-- first group -->
<Row>
<Sequence>100</Sequence>
<Value>+</Value>
</Row>
<Row>
<Sequence>105</Sequence>
<Value>+</Value>
</Row>
<Row>
<Sequence>110</Sequence>
<Value>-</Value>
</Row>
<!-- second group -->
<Row>
<Sequence>150</Sequence>
<Value>20</Value>
</Row>
<Row>
<Sequence>155</Sequence>
<Value>15</Value>
</Row>
<Row>
<Sequence>160</Sequence>
<Value>90</Value>
</Row>
</Rows>
Each element of 1st group related to an element of 2nd group: sequence -> sequence + 50
I need to get a node set of nodes from 2nd group which related nodes from 1st group contain + sign (nodes with sequences 150 and 155).
These nodes are needed for future sorting and enumerating.
/Rows/Row[contains(/Rows/Row[Sequence = (./Sequence - 50)]/Value, '+')]
I tried the above xpath, but failed as ./ is referenced to the current context (within second brackets), but I need to access to the parent one (within first brackets).
Do anybody know a solution for that?
Regards, Aikin
P.S. substring(./Sequence - 50, 1, 3) is used to get