thanks guys, i'm sure that my xml is valid, i've refined what i'm trying to do here a bit
public var debugModel:XML = <mergefields label="Merge Fields"> <group label="Employees"> <node label="Employee First Name" data="Employee_234234-234234-234234-234234" /> <node label="Employee Last Name" data="Employee_11111-111111-111111-111111" /> <node label="Last Performance Note Date" data="Employee_234234-234234-234234-234234" /> <node label="Login" data="Employee_234234-234234-234234-234234" /> <node label="Login Link" data="Employee_234234-234234-234234-234234" /> </group> ... what i'm trying to do is find any node that has a certain label, like so var fieldNode:XMLList = debugModel.children().node.(attribute("label") == "Employee First Name"); and no matter what i try it is not working, what it seems to be doing is returning me all children of the node i'm looking for (there are none). if I give that node some arbitrary child nodes, then the node is returned with it's children, what gives?. d. On Tue, Apr 15, 2008 at 1:22 PM, Varun Shetty <[EMAIL PROTECTED]> wrote: > make sure that your xml is wellformed > > it did work for me. > ------------------- code ------------------------ > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > layout="vertical" > initialize="runthis();"> > <mx:Script> > <![CDATA[ > > public var debugModel:XML = <mergefields display="Merge > Fields"> > <employees display="Employees"> > <node display="Employee First Name" > data="Employee_234234-234234-234234-234234" /> > <node display="Employee Last Name" > data="Employee_234234-234234-234234-234234" /> > <node display="Employee First Name" > data="Employee_1212121-121212-12121-12112121" /> > <node display="Employee Last Name" > data="Employee_1212121-121212-12121-12112121" /> > > </employees> > </mergefields>; > > public function runthis():void { > var fieldNode:XMLList = > debugModel.employees.node.(attribute("display") == "Employee First Name"); > trace(fieldNode); > } > ]]> > </mx:Script> > </mx:Application> > ------------------- code ------------------------ > > > On Tue, Apr 15, 2008 at 11:43 AM, Derrick Anderson < > [EMAIL PROTECTED]> wrote: > > > can someone please explain why this does not return an XMLList? > > > > public var debugModel:XML = <mergefields display="Merge Fields"> > > <employees display="Employees"> > > <node display="Employee First Name" > > data="Employee_234234-234234-234234-234234" /> > > <node display="Employee Last Name" > > data="Employee_234234-234234-234234-234234" /> > > ..... > > > > > > var fieldNode:XMLList = debugModel.employees.node.(attribute("display") > > == "Employee First Name"); > > > > but this does... > > > > public var thePeople:XML = <people> > > <person name="Mims Wright" suffix="III"> > > <age>27</age> > > <aka>Mims H Wright</aka> > > <aka>Teh AWesoeomes!</aka> > > <bio></bio> > > </person> > > ..... > > > > var fieldNode:XMLList = thePeople.person.(attribute("suffix") == "III"); > > > > i've tried a million different variations and i cannot get it to work > > with my XML- what am i doing wrong here? > > > > thanks, > > d. > > > > >