this should work 

if (node.ItemSource.(hasOwnProperty("Media"))


--- In [email protected], "kc7cia" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> I was hoping someone could tell me how to check to see if an XML
> element exists in AS3. I have an XML structure that looks like this:
> 
> <ItemSource component="DAM">
>     <Value>Candy</Value>
>     <Media caption="Glucose Meter">10-372.gif</Media>
> </ItemSource>
> 
> I want to be able to check to see if the ItemSource element has a
> Media subelement. The following code does not appear to work:
> 
> if (node.ItemSource.Media.text() != null)
>     Alert.show('media');
> else
>     Alert.show('no Media');
> 
> It always returns true, regardless of whether or not there is a Media
> subelement. Any help would be appreciated. Thanks!
>


Reply via email to