my xml file is basically laid out like this...
<mystuff name="test">
    <box boxname="mybox1" version="2" weight="2">
        <bag bagname="mybag1" weight="5">
            <bag bagname="mybag1.1" weight="4"></bag>
            <bag bagname="mybag1.2" weight="3"></bag>
    <box boxname="mybox2" version="2" weight="4"></box>
i'm using an xpath to retrieve all elements with a weight of "4" that looks like this...
//box[@weight='4'] | //bag[@weight='4'
and this gets the elements perfect. no problems.

as i loop through those elements, i'd like to also retrieve the parent names (if any) of those elements. how can i do this?