Errr, my very limited E4X knowledge now deserts me, but try:
pets.pet.(@name =="Sugar").parent().@group
*______________________________________
**Plastic Martians Ltd.*
email: m...@plasticmartians.co.uk
web:www.plasticmartians.co.uk
mobile: 07763 986 485
phone: 01434 382 973
On 05/05/2011 16:50, Mendelsohn, Michael wrote:
childnode.parent().@group
Thanks, Matt. Well, I'm getting stuck on finding the correct node then.
How do I find the node in the xml, given the node I have?
var myPet:XML =<pet name="Sugar"/>
I get errors with a statements like these:
pets..(pet.toXMLString() == myPet.toXMLString());
pets..(* == myPet);
Once I have that, then I can do the parent() method call.
var pets:XML =<pets group="A">
<pet name="Rover"/>
<pet name="Buffy"/>
</pets>
<pets group="B">
<pet name="Spot"/>
<pet name="Sugar"/>
</pets>;
_______________________________________________
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