Thanks. I'll explore those techniques, but if that's what it takes, I think
I'd be inclined to just return xml.nodes and iterate in code.
Or perhaps
result = xml.node.(matches(???))
assuming there's a way to refer to the current node in place of ???
I was hoping there was something like
q = { a : 1 b:* }
result = xml.node.(@a == q.a && @b == q.b)
I suppose another approach would be to ensure that each node has all the
candidate attributes, with some of them having a value "any", but that would
be a pity.
On Sat, May 29, 2010 at 3:08 AM, Oleg Sivokon <[email protected]> wrote:
>
>
> var xml : XML =
> <nodes>
> <node a="1"/>
> <node a="1" b="2"/>
> </nodes>;
> xml.no...@*.(/a|b/.test(localName()) && doSomething(valueOf()));
> . . .
> private function doSomething(xml:XML):void { trace(xml); }
>
> Like this?
>
>