You shouldn't do a check on the length() for xmlRoot... that represents the REGISTRY level... otherwise your code looks fine.
On Thu, Sep 22, 2011 at 4:54 PM, <[email protected]> wrote: > ** > > > I must be missing something simple here. I’m reading in XML that looks > like this:**** > > ** ** > > <?*xml* version="1.0" encoding="UTF-8"?>**** > > <REGISTRY>**** > > <REGISTRY_DECLARATION/>**** > > <REGISTRY_ENTRIES>**** > > <Attribute>**** > > <AttributeName>Attr_1</AttributeName>**** > > </Attribute>**** > > <Attribute>**** > > <AttributeName>Attr_2</AttributeName>**** > > </Attribute>**** > > <Attribute>**** > > <AttributeName>Attr_3</AttributeName>**** > > </Attribute>**** > > </REGISTRY_ENTRIES>**** > > </REGISTRY>**** > > ** ** > > I’m trying to get all <Atribute> nodes using the .. operator, but it always > returns 0, even though xmlRoot looks fine. **** > > ** ** > > *protected* *function* xmlService_resultHandler(event:ResultEvent):*void** > *** > > {**** > > *if* (event != *null* && event.result != *null* && event.result > *is*XML) { > **** > > *var* xmlRoot:XML = event.result *as* XML;**** > > *if* (xmlRoot && xmlRoot.length() > 0) {**** > > *var* lst:XMLList = xmlRoot..Attribute;**** > > *trace*(*"lst length = "* + lst.length());**** > > }**** > > }**** > > }**** > > ** ** > > ** ** > > *Michael***** > > ** ** > > >

