# Apply css style to a xml data in Flash 2004

**URL:** <https://forum.kirupa.com/t/apply-css-style-to-a-xml-data-in-flash-2004/133787>\
**Category:** Uncategorized\
**Created:** [January 12, 2005, 1:22am UTC](https://forum.kirupa.com/t/apply-css-style-to-a-xml-data-in-flash-2004/133787 "2005-01-12T01:22:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gianna1](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@Gianna1](https://forum.kirupa.com/u/Gianna1)\
**Post date:** [January 12, 2005, 1:22am UTC](https://forum.kirupa.com/t/apply-css-style-to-a-xml-data-in-flash-2004/133787/1 "2005-01-12T01:22:02Z")

</div>

Hello,

I`d like to know if it is posible to apply css style to a XML data in Flash 2004.

My code:

System.useCodepage = true;  
var meuXML:XML = new XML();  
meuXML.load(“iniciando1\_xml\_css.xml”);  
meuXML.ignoreWhite = true;  
meuXML.onLoad = function(){  
var format = new TextField.StyleSheet();  
var path = “estilo1.css”  
[color=red]var one = this.childNodes[0].childNodes[0].attributes.id;[/color]  
format.load(path);  
format.onLoad = function(loaded) {  
if (loaded) {  
texto1.styleSheet = format;  
texto1.text = one;  
} else {  
output.text = “Error loading CSS file!”;  
}  
}  
}

Now I want to do something like this to apply the CSS:  
[color=#ff0000]var one = “\<p class=‘negroB20’\>this.childNodes[0].childNodes[0].attributes.id\</p\>”;[/color]  
But it will not display the content of the node. It will display [color=#ff0000]this.childNodes[0].childNodes[0].attributes.id [/color][color=black]like an expresion.[/color]  
What should i do?

Thanks 😛

Gianna
