# Code for XML in Symbol

**URL:** https://forum.kirupa.com/t/code-for-xml-in-symbol/277776
**Category:** flash
**Created:** [December 17, 2008, 3:06am UTC](https://forum.kirupa.com/t/code-for-xml-in-symbol/277776 "2008-12-17T03:06:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mrcoolguy](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mrcoolguy](https://forum.kirupa.com/u/mrcoolguy)
#### Post date: [December 17, 2008, 3:06am UTC](https://forum.kirupa.com/t/code-for-xml-in-symbol/277776/1 "2008-12-17T03:06:45Z")

</div>

Sorry, my first post was in the other thread and it should have been here…anyways…

Below is the XML text I use, it works on a keyframe perfectly but when I try to put it into a symbol in the keyframe it does not work?  
can anyone help please?

* * *

function loadXML(loaded) {  
if (loaded) {

## \_root.home2 = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue; \_root.homemain\_txt.text = \_root.home2; } else { trace(“file not loaded!”); } } xmlData = new XML(); xmlData.ignoreWhite = true; xmlData.onLoad = loadXML; xmlData.load(“sitetext.xml”);
