# Not really doing to XML thing

**URL:** <https://forum.kirupa.com/t/not-really-doing-to-xml-thing/149693>\
**Category:** Uncategorized\
**Created:** [May 31, 2005, 5:22pm UTC](https://forum.kirupa.com/t/not-really-doing-to-xml-thing/149693 "2005-05-31T17:22:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imported\_mucho](https://avatars.discourse-cdn.com/v4/letter/i/3da27b/32.png) [@imported\_mucho](https://forum.kirupa.com/u/imported_mucho)\
**Post date:** [May 31, 2005, 5:22pm UTC](https://forum.kirupa.com/t/not-really-doing-to-xml-thing/149693/1 "2005-05-31T17:22:42Z")

</div>

Hi Everyone,

so I have this really cool XML parse script to load my different texts into two different textboxes.

This version:

```auto

// PARSE XML TEXT
function loadXML(loaded) {
	if (loaded) {
		_root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
		_root.sunset = this.firstChild.childNodes[0].childNodes[2].firstChild.nodeValue;
		name_txt.text = _root.inventor;
		scroller.text = _root.sunset;
	} else {
		content = "file not loaded!";
	}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("inventors.xml");
//END PARSE XML TEXT

```

works fine… I get the header and the body part (meaning the two textfields are loaded with text)

If I, however do this:

```auto

// PARSE XML TEXT
function loadXML(loaded) {
	if (loaded) {
		_root.who = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
		_root.news = this.firstChild.childNodes[0].childNodes[3].firstChild.nodeValue;
		name_txt.text = _root.who;
		scroller.text = _root.news;
	} else {
		content = "file not loaded!";
	}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("inventors.xml");
//END PARSE XML TEXT

```

it aint working no more…

what am I missing here?

Help appreciated, thanks in advance,  
m.
