XML Links Question

Hi,

Is there a way to create a list of text links, one for each category of project in my XML list. Here is a sample of my XML:

 
<projects>
 <project name="Make It Rock Poster" description="Poster for snowboarding trip up to Lutsen, MN" category="Logo">
  <image>one.jpg</image>
  <image>three.jpg</image>
 </project>
 <project name="Bema Seat Poster" description="Poster for Bema Seat presentation at St. Cloud for Campus Crusade for Christ" category="Web">
  <image>two.jpg</image>
 </project>
 <project name="Missian Wedding Invitation" description="Wedding invitations for Jordan and Char" category="Print">
  <image>oneF.png</image>
 </project>
</projects>

I’d like to create a list of links, taking the categories from the XML like this:

Logo
Print
Web

And then when you click on the link, the specific projects in that category would appear.

I have this so far:

 
private function addThumb(evt:TimerEvent):void
  {
     var a:int = evt.target.currentCount-1;
     var nextThumb:Thumbnail = new Thumbnail();
     nextThumb.displayTxt = xmlProjects..project[a].@name;
     nextThumb.fullImage = xmlProjects..project[a].image;
     nextThumb.descTxt = xmlProjects..project[a].@description;
     nextThumb.x = -150;
     nextThumb.y = 45+(a*nextThumb.height)+a*3;
     addChildAt(nextThumb,2);
     nextThumb.addEventListener("loadProject", doLoadProject);
     TweenLite.to(nextThumb, 1, {x:16, ease:Quadratic.easeInOut});
  }

Thanks!

var xml:XML = <projects>
				 <project name="Make It Rock Poster" description="Poster for snowboarding trip up to Lutsen, MN" category="Logo">
				  <image>one.jpg</image>
				  <image>three.jpg</image>
				 </project>
				 <project name="Bema Seat Poster" description="Poster for Bema Seat presentation at St. Cloud for Campus Crusade for Christ" category="Web">
				  <image>two.jpg</image>
				 </project>
				 <project name="Missian Wedding Invitation" description="Wedding invitations for Jordan and Char" category="Print">
				  <image>oneF.png</image>
				 </project>
				</projects>;
var tf:TextField = new TextField();
tf.border = true;
tf.width = 500;
tf.height = 300;
tf.multiline = true;
tf.wordWrap = true;
tf.condenseWhite = true;
addChild(tf);
var css:StyleSheet = new StyleSheet();
css.parseCSS('.bd{display:block; font-weight:bold; font-family:sans-serif},.nl{display:block; font-family:sans-serif},.ds{display:block; font-family:sans-serif; font-size:10}, a:hover{text-decoration:underline}, a:link{text-decoration:none}');
tf.styleSheet = css;
trace(formHTMLtext(xml));
tf.htmlText = formHTMLtext(xml);
function formHTMLtext(xl:XML):String {
	var str:String = '';
	var txt:XML = <htmltext/>;
	var list:XML = <ol/>;
	var p:XML = <p/>;
	var span:XML = <span class="bd" />;
	var nspan:XML = <span class="nl" />;
	var sspan:XML = <span class="ds" />;
	var li:XML = <li><a/></li>;
	var br:XML = <br/>;
	var xll:XMLList = xl.project;
	var i:int=0;
	var l:int = xll.length();
	var xn:XML;
	var xi:XML;
	var xnn:XMLList;
	for(i; i<l; i++){
		xn = txt.appendChild(p.copy()).**;
		xn.appendChild(span.copy().appendChild(String(xll*.@category)));
		xn.appendChild(br.copy());
		xn.appendChild(nspan.copy().appendChild(String(xll*.@name)));
		xn.appendChild(br.copy());
		xn.appendChild(sspan.copy().appendChild(String(xll*.@description)));
		xn.appendChild(br.copy());
		xnn = xll*.image;
		xn.appendChild(list.copy());
		for(var j:int=0; j<xnn.length(); j++){
			xi = li.copy();
			xi.a.@href = xnn[j].text();
			xi.a.appendChild(xnn[j].text());
			xn.ol[0].appendChild(xi);
		}
	}
	return txt.children().toXMLString();
}

This is just an example.