> I think David may be wrong here. What he's shown is how
> you would pull out any records where the attribute
equals
> Bill.
That was my interpretation of what Casey was asking for.
>> Can someone tell me whats wrong with my search
sytax?
>> I'm trying to return all items that which have a nme
attribute
>> value of "Bill"
The return value of the code I suggested is an instance of
the XMLList
class. For example, this variant should put "true" in your
Output panel:
trace(pXML.usr.(@nme=="Bill") is XMLList);
... and this variant will should put "1", because your sample
code only
contained a single element whose nam attribute was Bill:
trace(pXML.usr.(@nme=="Bill").length());
If it helps, you can store the return value in a new
variable and
retrieve your data from it using further E4X syntax:
var filteredResult:XMLList = pXML.usr.(@nme=="Bill");
trace(filteredResult.toXMLString());
trace(filteredResult[0].@nme);
// etc.
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design."