# Problems import XML

**URL:** <https://forum.kirupa.com/t/problems-import-xml/279831>\
**Category:** flash\
**Created:** [January 19, 2009, 8:30pm UTC](https://forum.kirupa.com/t/problems-import-xml/279831 "2009-01-19T20:30:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kokx](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@kokx](https://forum.kirupa.com/u/kokx)\
**Post date:** [January 19, 2009, 8:30pm UTC](https://forum.kirupa.com/t/problems-import-xml/279831/1 "2009-01-19T20:30:27Z")

</div>

Hello,

From a XML file I want show the picture & description in the root. The  
movie with buttons is in a movieclip. The picture works, but the text  
didn’t show.  
I hope somebody can help me with this!  
Thanks!  
Kokx

var XMLDOC:XML = new XML();  
XMLDOC.ignoreWhite = true;  
XMLDOC.load(“hond.xml”);  
XMLDOC.onLoad = function(success:Boolean):Void {  
if (success) {  
XML1 = XMLDOC.firstChild;  
loadMovie(+XML1.firstChild.firstChild.firstChild, \_root.container);  
description.text = XMLDOC.firstChild.childNodes\*.childNodes[1].firstChild;  
}  
};  
i = 0;  
function doit() {  
i++;  
if (XMLDOC.firstChild.childNodes\*.firstChild.firstChild == undefined) {  
i = XMLDOC.firstChild.childNodes.length;  
tex.text = "end of pictures ";  
return false;  
} else {  
loadMovie(+XMLDOC.firstChild.childNodes\*.firstChild.firstChild, \_root.container);  
description.text = XMLDOC.firstChild.childNodes\*.childNodes[1].firstChild;  
tex.text = "picture number "+i;  
}  
}  
function doi() {  
i–;  
if (XMLDOC.firstChild.childNodes\*.firstChild.firstChild == undefined) {  
i = 0;  
tex.text = “end of pictures”;  
return false;  
} else {  
loadMovie(+XMLDOC.firstChild.childNodes\*.firstChild.firstChild, \_root.container);  
description.text = XMLDOC.firstChild.childNodes\*.childNodes[1].firstChild;  
tex.text = "picture number "+i;  
}  
}  
btnext.onPress = function() {  
doit();  
};  
btprev.onPress = function() {  
doi();  
};
