his XML is fine, its either the chattyfig server or our email clients stripping 
his xml..


//product[colors[clr='red']] will only return results if the first clr child 
node of the colors tag has a value of red.

the correct syntax to return any clr child of colors that matches red would be :

//product[colors/clr[.='red']]

but neither the xfactor studio xpath parser or the mx.xpath.xpathAPI classes 
return anything for that xpath query.  I tested it in internet explorer and it 
works fine.

grant

----- Original Message -----
From: Chris Wilcox [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: 11/3/05 10:00 AM
Subject: RE: [Flashcoders] XPath Error...

> 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).
> 
> 
>   
>     
>     
>   
> 
> 
> 
>   
>     
>   
>   
>     
>   
> 
> 
> 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" 
> To: "Flashcoders mailing list" 
> 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

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to