hola es la primera ves que uso un xml este es el codigo que estoy usando en flash para llamar el xml
este es el codigo de flash con el cual quiero que mis textos dinamicos se le asignen las vaariables del xml
obj_xml = new XML();
obj_xml.load("movsic.xml");
obj_xml.ignoreWhite = true;
obj_xml.onLoad = function(exito) {
if (exito) {
trace("paso");
descripcion.text = obj_xml.firstChild.childNodes[0].attribute.descripcion;
categoria.text = obj_xml.firstChild.childNodes[0].attribute.categoria;
precio.text = obj_xml.firstChild.childNodes[0].attribute.precio;
genero.text = this.firstChild.childNodes[0].attribute.genero;
titulo.text = obj_xml.firstChild.childNodes[0].attribute.material_titulo;
} else {
cuerpo_txt.text = "Error";
}
};
este es el xml
<?xml version="1.0" encoding="iso-8859-1"?>
<Movsic>
<material titulo="Supernatural Season 4" descripcion="Two brothers search for their missing father, the man who trained them to be warriors against supern" precio="29.99" categoria="DVD" genero="Horror" imagen="SupernaturalSeason4.jpg"/>
<material titulo="WWE Smackdown! vs Raw 2010" descripcion="The world is yours now! You can create your own entrance, finishing manouver, corner finisher, and p" precio="39.99" categoria="Games" genero="T" imagen="wwe-smackdown-vs-raw-2010.jpg"/>
<material titulo="Cloudy with a Chance of Meatballs" descripcion="The most delicious event since macaroni met cheese. Inspired by the beloved children's book, the fil" precio="19.99" categoria="Blue-Ray" genero="Comedy" imagen="cloudy_with_a_chance_of_meatballs.jpg"/>
<material titulo="REC" descripcion="REC turns on a young TV reporter and her cameraman who cover the night shift at the local fire stati" precio="16.99" categoria="DVD" genero="Horror" imagen="rec.jpg"/>
<material titulo="Dr House Season 3" descripcion="An antisocial maverick doctor who specializes in diagnostic medicine does whatever it takes to solve puzzling cases that come his way using his crack team of doctors and his wits." precio="25.99" categoria="DVD" genero="Humor" imagen="dr-house-3.jpg"/>
</material>
</Movsic>