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.
<items>
<product>
<resourceImages>
<image />
</resourceImages>
</product>
<product>
<resourceImages>
<image />
</resourceImages>
</product>
<prepack>
<resourceImages />
</prepack>
<product>
<resourceImages>
<image />
</resourceImages>
</product>
<prepack>
<resourceImages />
</prepack>
</items>