Well spotted hadn't seen the inconsistent xml, which means you're also right about the XPath...
Chris Wilcox ________________________________ Bounce Digital Ltd 12 Goslett Yard | London | WC2H 0EQ UK T +44(0)207 478 4488 | www.bouncedigital.co.uk -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: 03 November 2005 14:09 To: Flashcoders mailing list Subject: Re: [Flashcoders] XPath Error... But the xml structure is not consistent (unless there was a typo). <product> <colors> <clr></clr> <clr></clr> </colors> </product> <product> <colors> <clr></clr> </colors> <colors> <clr></clr> </colors> </product> So, if i'm not mistaken, this "//product[colors[clr= 'green']]" will only work for the second part (multiple 'colors' nodes), not the first one. regards, Muzak ----- Original Message ----- From: "Chris Wilcox" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com> Sent: Thursday, November 03, 2005 2:30 PM Subject: RE: [Flashcoders] XPath Error... Hmm... it works if you nest the predicate bit to... "//product[colors[clr= 'green']]" ...apparently (after quick google) this is legal XPath. Chris Wilcox ________________________________ _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. ______________________________________________________________________ _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders