as3 xml check if element exists

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>
8
задан chchrist 2 December 2010 в 13:22
поделиться