# Display XML inside Dynamic text

**URL:** <https://forum.kirupa.com/t/display-xml-inside-dynamic-text/178128>\
**Category:** flash\
**Created:** [February 7, 2006, 9:44pm UTC](https://forum.kirupa.com/t/display-xml-inside-dynamic-text/178128 "2006-02-07T21:44:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dima71](https://avatars.discourse-cdn.com/v4/letter/d/ac91a4/32.png) [@Dima71](https://forum.kirupa.com/u/Dima71)\
**Post date:** [February 7, 2006, 9:44pm UTC](https://forum.kirupa.com/t/display-xml-inside-dynamic-text/178128/1 "2006-02-07T21:44:52Z")

</div>

Hi

i try to display data from the XML file inside dynamic text using this code :

> 

book\_xml = new XML();  
book\_xml.ignoreWhite = true;  
book\_xml.onLoad = function(success) {  
if (success) {  
display\_cont(book\_xml);  
\_root.container.text = Result;  
}  
};  
book\_xml.load(“xml.xml”);  
display\_cont = function (Doc\_xml) {  
Result = new Array();  
for (var n = 0; n\<Doc\_xml.firstChild.childNodes.length; n++) {  
Result1 = [Doc\_xml.firstChild.childNodes[n].firstChild.nodeValue];  
Result.push(Result1);  
}  
};  
for (i=0; i\<Result.length; i++) {  
Result = Result\*;  
}

The output is :

> 

059600396X,ActionScript for Flash MX: The Definitive Guide, 2nd Edition,Book,null,19 December, 2002,O’Reilly & Associates,[http://images.amazon.com/images/P/059600396X.01.THUMBZZZ.jpg](http://images.amazon.com/images/P/059600396X.01.THUMBZZZ.jpg),

can i display it so each record come in new line ?

> 

059600396X  
ActionScript for Flash MX: The Definitive Guide  
2nd Edition  
Book,  
.  
.  
etc

check the attached zip file
