Dynamic E4X expressions

aeroff

New Member
My last Q:E4X select Nodes where descendants can be either A OR B or A && Bwas concerning how to query for multiple attribute values in E4X expressions, which @Patrick answered with this:\[code\]xml.Item.(descendants('ProductRange').(@id=="1" || @id=="2").length()>0);\[/code\]Now the question is, how do we make the values dynamic using an array or string?A bit like this, but this DOES NOT work:\[code\]var attributeValues:String = "@id==\"1\" || @id==\"2\" || @id==\"3\" || @id==\"4\"";xml.Item.(descendants('ProductRange').(attributeValues).length()>0);\[/code\]Many Thanks
 
Back
Top