i am experimenting with xpath.
Here is the xml I am using for experimenting:
<moves>
<roll player="1">6</roll>
<piece nr="1" player="1" field="1"/>
<roll player="2">4</roll>
<roll player="2">6</roll>
<piece nr="5" player="2" field="11"/>
<roll player="1">4</roll>
<piece nr="1" player="1" field="5"/>
<roll player="2">6</roll>
<piece nr="5" player="2" field="17"/>
<roll player="1">6</roll>
<piece nr="2" player="1" field="1"/>
<roll player="2">6</roll>
<piece nr="6" player="2" field="11"/>
</moves>
So how to implement an if else in xpath?
Like if the second action is from player one, then do f.ex.: give it back...
UPDATE 1:
Ok here is what i mean:
boolean(/game/moves/roll[2]/@player=1
That gives me back if the second element is player 1 or not ,so now I want to add an else-Path like if it would be? So how to add that?