I'm trying to parse this XML string:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<response type="success">
   <lots>
      <lot>32342</lot>
      <lot>52644</lot>
   </lots>
 </response>
When I get the root node, which is "response", I use the method getChildNodes() which returns a NodeList of length 3. However what I'm confused about is the order the NodeList gets created in. I used some print statements to show whats in the list
Item length: 3
Item (0): [#text: 
]
Item (1): [lots: null]
Item (2): [#text: 
]
So the text node is first which is two levels below the root, then the next child of the root, and then the next text node.
Is there a particular order and/or reason the list is ordered in this way?