# If XML Node exists... else... help

**URL:** <https://forum.kirupa.com/t/if-xml-node-exists-else-help/200262>\
**Category:** flash\
**Created:** [September 10, 2006, 10:21pm UTC](https://forum.kirupa.com/t/if-xml-node-exists-else-help/200262 "2006-09-10T22:21:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![obey360](https://avatars.discourse-cdn.com/v4/letter/o/3ab097/32.png) [@obey360](https://forum.kirupa.com/u/obey360)\
**Post date:** [September 10, 2006, 10:21pm UTC](https://forum.kirupa.com/t/if-xml-node-exists-else-help/200262/1 "2006-09-10T22:21:45Z")

</div>

I am tweaking the famous XML Flash Gallery posted on this site (which is sweet by the way). I have added a button to the Flash file for URLs (and a \<url\>\</url\> childNode to the XML file). I am able to parse the url node into the Flash file just fine.

My goal is to have a button named “go” link off to a URL for each entry made in the XML file:

```auto
go.onRelease = function() {
    getURL(url[p], "_blank");
};

```

This works just fine. However, not all nodes in the XML file will have a childNode. So I’m stuck trying to write some action script that says this:

```auto
If (the XML file contains data for <url></url>, ){
go._visible=true;
} else {
go._visible=false;
}

```

Basically if the XML contains data for the URL Node, this button shows up. otherwise this button isn’t visible.

any help is greatly appreciated. Thanks.
