I tend to use E4X when working with XML, so dotting down through an
XML Object will return an XMLList. If the XMLList is length 0 then
that node wasn't found, so if there was no person element
newXML.person would return a new XMLList where .length == 0
If person was there but was a null or empty element as in your case,
you can do a toString and check for empty string so
if(newXML.person.toString() != "")
{
//whatever
}
--- In [email protected], "markgoldin_2000"
<[EMAIL PROTECTED]> wrote:
>
> My ListGrid's selectedItem looks like this:
>
> <consistpersonnel1>
> <id>
> 0
> </id>
> <consistnum>
> 0
> </consistnum>
> <header_id>
> 0
> </header_id>
> <person/>
> <name/>
> <worknum/>
> </consistpersonnel1>
>
> trace(xmlNew["id"]) shows 0, but trace(xmlNew["person"]) shows
> nothing. How can I check if "person" has any value then?
>
> Thanks
>