title: as3 xml check if element exists
body: <p>I want to check if the element  in this structure exists for each child. The problem is that the children don't have the same name (product,prepack) and I don't want to change the order. Additionally I can't change the XML structure.</p>
  
  <pre><code>&lt;items&gt;
      &lt;product&gt;
          &lt;resourceImages&gt;
              &lt;image /&gt;
          &lt;/resourceImages&gt;
      &lt;/product&gt;
      &lt;product&gt;
          &lt;resourceImages&gt;
              &lt;image /&gt;
          &lt;/resourceImages&gt;
      &lt;/product&gt;
      &lt;prepack&gt;
          &lt;resourceImages /&gt;
      &lt;/prepack&gt;
      &lt;product&gt;
          &lt;resourceImages&gt;
              &lt;image /&gt;
          &lt;/resourceImages&gt;
      &lt;/product&gt;
      &lt;prepack&gt;
          &lt;resourceImages /&gt;
      &lt;/prepack&gt;
  &lt;/items&gt;
  </code></pre>