How to get all the child seats and their attributes from this XML file?
<seatmap id="1">
<seat row="A" seatnum="01" available="1" />
<seat row="A" seatnum="02" available="1" />
<seat row="A" seatnum="03" available="1" />
<seat row="A" seatnum="04" available="1" />
<seat row="A" seatnum="05" available="1" />
</seatmap>
I have different cards for sitting, so I want to get them by requesting an identifier, then assigning “nodes” and their attributes to all nodes.
I have been using DOM methods so far, but maybe simpleXML or XPath would be simpler, since it is really confusing when you are looking at DOMDocumet, DOMElement, DOMNode.
Any help would be great, cheers!
source
share