Help with searching an XML

Hello everyone. So, ive used this very helpful tutorial http://www.kirupa.com/web/xml/examples/searchbestof.htm to set up my own serachable XML database.

However, i need an extra depth of information in my database which the search function laid out in that tutorial doesnt address, and frankly, the nested loops are really confusing me.

Here is the basic set up for my XML … there will be 100 or more entries like this…


<?xml version="1.0" ?>

<All>
	<project>
		<title>xxx xxxxx avenue</title>
		<location>new york, new york</location>
		<info>
			<type>office</type>
			<status>design 1985 / completion 1989</status>
			<page><![CDATA[<a href="http://www.xxxxxxxxxx.com/lex425.html" target="_blank">425 lexington avenue</a>]]></page>
		</info>
	</project>		


</All>

and here is my search function in AS2


SearchXML = function(nodes, query, useChildElements){
	var results = [];
	for (var i=0; i<nodes.length; i++){
		for (var j=0; j<nodes*.childNodes.length; j++){
			currNode = nodes*.childNodes[j];
			if (useChildElements.contains(currNode.nodeName)){
				if (currNode.firstChild.nodeValue.contains(query)){
					results.push(nodes*);
					break;
				}
			}
		}
	}
	return results;
}

What i need is a flash code that will search the <info> section of the XML above. Which means i need it to search childNodes[x].firstChild.firstChild.nodeValue and childNodes[x].firstChild.nextSibling.firstChild.nodeValue
while the SearchXML script only goes as deep as firstChild.

I would really appreciate any help. Thanks in advance!