A user can select a performance, so the performance elements have unique ID's. I want to basically say:
Select all reservations->reservation['seat'] FROM performances->performance['id=2'].
Hope that makes sense, I really am struggling with selections in simple XML.
Thanks in advance, Henry.
<performances>
<performance id="7" time="12:00" day="Monday" month="June" year="2010">
<reservations>
<reservation seat="a7"/>
<reservation seat="a2"/>
<reservation seat="a3"/>
</reservations>
</performance>
<performance id="8" time="12:00" day="Tuesday" month="June" year="2010">
<reservations>
<reservation seat="a8"/>
</reservations>
</performance>
</performances>
Extra Info:
I am currently using: echo $xml2->show->performances->performance['0']->reservations->reservation['seat']
This gets one reservation from the first performance, but I want all reservations from the performance with the id of '3' for example.