You would do xml..product.(@prodCode == id);

Yep, that simple.

Taka

On Thu, Nov 4, 2010 at 11:17 AM, Matt S. <mattsp...@gmail.com> wrote:

> I know this is easy, but I'm having trouble finding the answer: if I'm
> iterating through XML like so:
>
> return xml.category.(@name == cat[0]).subcategory.subcategory2.(@name
> == cat[1]).product.(@prodCode == String(id));
>
> where "cat" is an array, eg cat = ["men","shirts"]
>
> but what I want to do is search the ENTIRE XML for the first
> occurrence, in any category/subcategory, of a @prodCode that matches
> "id", how would I do that?
>
> eg,I want to do something like
>
> return xml.category.*.subcategory.subcategory2.*.product.(@prodCode ==
> String(id));
>
> but that's obviously not the actual code. Does anyone have any suggestions?
>
> Thanks!
>
> .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

Reply via email to