# XML -\> Flash (well PHP & MySQL too)

**URL:** <https://forum.kirupa.com/t/xml-flash-well-php-mysql-too/206327>\
**Category:** flash\
**Created:** [November 7, 2006, 5:21am UTC](https://forum.kirupa.com/t/xml-flash-well-php-mysql-too/206327 "2006-11-07T05:21:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![locatorjg1](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@locatorjg1](https://forum.kirupa.com/u/locatorjg1)\
**Post date:** [November 7, 2006, 5:21am UTC](https://forum.kirupa.com/t/xml-flash-well-php-mysql-too/206327/1 "2006-11-07T05:21:49Z")

</div>

Kirupa, first let me start by thanking you for teaching me so much. You have brought me to a new level… unfortunatley, I’m stuck… 🙂

## I am totally lost and not sure where I went wrong. Let me start from the begining… I created a simple MySQL database and wrote a PHP file which in turn is writing XML. So I called for that php file (using xmlData.load). I’m able to display/read the first three nodes, but no matter what I do I can’t get the last two to display. What am I doing wrong, and what can I do to fix this? I really want to better understand this… Here is the what the PHP file displays when I view the source: \<?xml version=“1.0”?\> \<election\> \<district\>\<b\>Congress - 3rd\</b\>\</district\> \<mug\>images/DavidMes.jpg\</mug\> \<candidate\>\<br\>David Mejias (D, WF)\<br\>Peter King (R, I, C)\</candidate\> \<votes\>\<br\>467,483\<br\>370,987\</votes\> \<percentage\>\<br\>0\<br\>0\</percentage\> \</election\>

Here is the AS I have calling the XML in:  
function loadXML(loaded) {  
if (loaded) {  
\_root.par = this.firstChild.firstChild.firstChild;  
\_root.district = par;  
\_root.mugShot = this.firstChild.firstChild.nextSibling.firstChild.nodeValue;  
\_root.cand = this.firstChild.firstChild.nextSibling.nextSibling.firstChild;  
//  
\_root.votes = ??? // These are the two that I’m lost on???  
\_root.perct = ??? // These are the two that I’m lost on ☹  
//  
name\_txt.htmlText = \_root.district;  
placeHolder\_mc.loadMovie(mugShot);  
cands\_txt.htmlText = \_root.cand;  
votes\_txt.htmlText = \_root.votes;  
perct\_txt.htmlText = \_root.perct;  
} else {  
trace(“file not loaded!”);  
}  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“e\_xml.php?race=3”);

Thank you so much in advance!
