# Read xml attribute problem in Flash MX

**URL:** <https://forum.kirupa.com/t/read-xml-attribute-problem-in-flash-mx/125446>\
**Category:** Uncategorized\
**Created:** [October 13, 2004, 5:25pm UTC](https://forum.kirupa.com/t/read-xml-attribute-problem-in-flash-mx/125446 "2004-10-13T17:25:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gf05856](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@gf05856](https://forum.kirupa.com/u/gf05856)\
**Post date:** [October 13, 2004, 5:25pm UTC](https://forum.kirupa.com/t/read-xml-attribute-problem-in-flash-mx/125446/1 "2004-10-13T17:25:05Z")

</div>

I would like to read the xml below, is anybody able to adjust the actionscript below to read the attribute Header?

[**[font=Courier New][color=#ff0000]-[/color][/font]**](http://www.baby.shyper.com/Flash/Other/readwrite/news.xml#) [color=#0000ff]\<[/color][color=#990000]Events[/color][color=#0000ff]\>[/color]  
[color=#0000ff]\<[/color][color=#990000]Event[/color] [color=#990000]Header[/color][color=#0000ff]=“Header 1[/color][color=#0000ff]” [/color][color=#990000]Content[/color][color=#0000ff]=“Content 1[/color][color=#0000ff]”[/color][color=#0000ff]/\>[/color]  
[color=#0000ff]\</[/color][color=#990000]Events[/color][color=#0000ff]\>[/color]

GetTitleText = function(news\_xml, entry\_index){  
var entries = news\_xml.firstChild.childNodes;  
var title\_element = entries[entry\_index].firstChild;  
return title\_element.firstChild.nodeValue;

The below is then being used to get the data into the flash field “title\_txt”.  
title\_txt.htmlText = GetTitleText(news\_xml, news\_index-1);

Thanks in advance for your help.  
Frederik.
