title: Order of elements from minidom getElementsByTagName
body: <p>Is the order for returned elements from Mindom <code>getElementsByTagName</code> the same as it is in document for elements in the same hierarchy / level?</p>
  
  <pre><code>    images = svg_doc.getElementsByTagName('image') 
      image_siblings = []
      for img in images:
          if img.parentNode.getAttribute('layertype') == 'transfer':
              if img.nextSibling is not None:
                  if img.nextSibling.nodeName == 'image':
                      image_siblings.append(img.nextSibling)
                  elif img.nextSibling.nextSibling is not None and img.nextSibling.nextSibling.nodeName == 'image':
                      image_siblings.append(img.nextSibling.nextSibling)
  </code></pre>
  
  <p>I need to know if <code>image_siblings</code> will contain the images in the same order, they are placed in the document for the same hierarchy.</p>
  
  <p>I found a similar <a href="https://stackoverflow.com/questions/4954003/order-of-the-elements-returned-using-getelementsbytagname">question</a> for JavaScript, but I'm unsure if this is also true for Python (version 3.5.2) Minidom <code>getElementsByTagName</code>.</p>