# Reading from XML tutorial

**URL:** https://forum.kirupa.com/t/reading-from-xml-tutorial/62492
**Category:** flash
**Created:** [August 28, 2004, 9:33am UTC](https://forum.kirupa.com/t/reading-from-xml-tutorial/62492 "2004-08-28T09:33:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sandeep](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@sandeep](https://forum.kirupa.com/u/sandeep)
#### Post date: [August 28, 2004, 9:33am UTC](https://forum.kirupa.com/t/reading-from-xml-tutorial/62492/1 "2004-08-28T09:33:04Z")

</div>

Hey

I was going through tthe [Displaying from a XML file](http://www.kirupa.com/developer/actionscript/xmldataflash.htm) tutorial. And i’ve understood the concept of nodes and levels.

I was experiementing with it and I wanted to display an RSS feed from a site to make it the way its supposed to be viewed.

This is the current code I have

```auto
function loadXML(loaded) { 
if (loaded) { 
_root.inventor = this.firstChild.childNodes[0].childNodes[8].childNodes[2].firstChild.nodeValue; 
_root.comments = this.firstChild.childNodes[0].childNodes[8].childNodes[0].firstChild.nodeValue;
_root.link = this.firstChild.childNodes[0].childNodes[8].childNodes[2].firstChild.nodeValue;
name_txt.text = _root.inventor; 
comment_txt.text = _root.comments;
getURL(_root.link);
} else { 
  trace("file not loaded!"); 
} 
} 
xmlData = new XML(); 
xmlData.ignoreWhite = true; 
xmlData.onLoad = loadXML; 
xmlData.load("http://news.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss091.xml");

```

It works to some extent. Except I have a few questions now.

If the above AS is used in the XML tutorial it kinda works. Displays a heading and as such. However, Id like to know

1- How do i link a piece of text in XML? I want to link the title to its respective link.

2- Is there a way of looping or using an IF statement so that I could display all the titles from the nodes which have the name “title” ?

All help appreciated

Thanks

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 29, 2004, 9:48am UTC](https://forum.kirupa.com/t/reading-from-xml-tutorial/62492/2 "2004-08-29T09:48:50Z")

</div>

Can’t anyone help? all i want to know is how to hyperlink a word/sentence using actionscript!
