@name - will that cause problems because "name" is a property of XML nodes?
if it is maybe try attribute("name") instead?
On 05/05/2011 16:53, Kenneth Kawamoto wrote:
var xml:XML = <root>
<pets group="A">
<pet name="Rover"/>
<pet name="Buffy"/>
</pets>
<pets group="B">
<pet name="Spot"/>
<pet name="Sugar"/>
</pets>
</root>;
trace(xml.pets.pet.(@name == "Sugar").parent().@group);
// B
Perhaps you don't want to call your XML "pets" as it's a node name as
well.
Kenneth Kawamoto
http://www.materiaprima.co.uk/
On 05/05/2011 16:32, Mendelsohn, Michael wrote:
Hi list...
I'm trying to find some xml's parent attribute.
I have<pet name="Sugar"/> and I want to find "B".
var pets:XML =<pets group="A">
<pet name="Rover"/>
<pet name="Buffy"/>
</pets>
<pets group="B">
<pet name="Spot"/>
<pet name="Sugar"/>
</pets>;
I can't seem to find it. Anyone know how?
Thanks,
- Michael M.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders