# E4X XML targeting

**URL:** <https://forum.kirupa.com/t/e4x-xml-targeting/259534>\
**Category:** flash\
**Created:** [May 6, 2008, 2:15pm UTC](https://forum.kirupa.com/t/e4x-xml-targeting/259534 "2008-05-06T14:15:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hybrid9](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@hybrid9](https://forum.kirupa.com/u/hybrid9)\
**Post date:** [May 6, 2008, 2:15pm UTC](https://forum.kirupa.com/t/e4x-xml-targeting/259534/1 "2008-05-06T14:15:37Z")

</div>

Stay on target…

I have two issues that I can’t wrap my brain around with E4X. First, I’m using Faust to transform my xhtml code into an xml variable that flash can read via swfobject. More info here: [http://blog.space150.com/2007/1/11/faust-flash-augmenting-standards](http://blog.space150.com/2007/1/11/faust-flash-augmenting-standards)

I can read the XML no problem and even turn specific nodes into an XMLList, specifically the one below.

```auto
<div id="Menutitle">
     <p class="MenuImage">
          <img src="images/image1.png" />
     </p>
     <p class="title">TITLE</p>
     <p class="subtitle">SUBTITLE</p>
     <p class="description">Description</p>
</div>

```

What happens though is if the “subtitle” is empty, the node appears like

```auto
<p class="subtitle" />

```

1 - How can I target the above node if there is no content between that tag? Or any empty node?

2 - How can I target just the attribute “subtitle” in that xmllist, therefore seeing if it exists or not?

thanks for any help! :puzzled:
