# Filtering xml with E4X

**URL:** <https://forum.kirupa.com/t/filtering-xml-with-e4x/292613>\
**Category:** flash\
**Created:** [July 16, 2009, 12:20pm UTC](https://forum.kirupa.com/t/filtering-xml-with-e4x/292613 "2009-07-16T12:20:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Burvs](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@Burvs](https://forum.kirupa.com/u/Burvs)\
**Post date:** [July 16, 2009, 12:20pm UTC](https://forum.kirupa.com/t/filtering-xml-with-e4x/292613/1 "2009-07-16T12:20:02Z")

</div>

Hi all,

I’m trying to work out how to filter the below XML (loaded into a var called “projectsXML”) by the contents of the “tag” nodes, but can’t quite get it working.

So for instance, how would I use an E4X expression to return an XMLList that contained only those projects which have a tag of “Website”?

Here’s the xml:

```auto
<projects>
	<project>
		<title>My project</title>
		<tags>
			<tag>Website</tag>
		</tags>
	</project>
	<project>
		<title>Another project</title>
		<tags>
			<tag>Game</tag>
		</tags>
	</project>
	<project>
		<title>Yet another one</title>
		<tags>
			<tag>Website</tag>
			<tag>Game</tag>
			<tag>Application</tag>
		</tags>
	</project>
	<project>
		<title>And another</title>
		<tags>
			<tag>Game</tag>
			<tag>Website</tag>
		</tags>
	</project>
</projects>

```

Thanks!
