# Need Some Help With XML

**URL:** <https://forum.kirupa.com/t/need-some-help-with-xml/195758>\
**Category:** flash\
**Created:** [August 2, 2006, 9:58pm UTC](https://forum.kirupa.com/t/need-some-help-with-xml/195758 "2006-08-02T21:58:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![themethods](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@themethods](https://forum.kirupa.com/u/themethods)\
**Post date:** [August 2, 2006, 9:58pm UTC](https://forum.kirupa.com/t/need-some-help-with-xml/195758/1 "2006-08-02T21:58:33Z")

</div>

I’m trying to create a dynamic news section that works off of a XML file and I’m running into some problems. Here’s the code I’m using right now

```auto
//load XML
xmlContent = new XML();
xmlContent.ignoreWhite = true;
xmlContent.load("news.xml");
xmlContent.onLoad = function(success){
	if(success){
		processXML(xmlContent);
	}
}

function processXML(xmlContent) {
	numEntries = xmlContent.firstChild.firstChild.childNodes.length;
	for (i = 0; i <= numEntries; i++) {
		clipName = "news" + i;
		module.news.duplicateMovieClip(clipName, i);
		module[clipName].headline_txt.htmlText = xmlContent.firstChild.firstChild.childNodes*.firstChild.nodeValue;
		module[clipName].body_txt.htmlText = xmlContent.firstChild.firstChild.nextSibling.childNodes*.firstChild.nodeValue;
		module[clipName]._y = i * 163;
	}
}

```

It seems to duplicate the movies correctly, but it won’t load the XML into the corresponding text boxes I’ve created. I’ve included a link to the source files as well if anyone has a minute to take a look.

[http://client.methodsofmadness.com/dropbox/XMLnews.zip](http://client.methodsofmadness.com/dropbox/XMLnews.zip)

Also, if you can help with getting the date from the attributes of the news item I’d like it to go in the “date\_txt” box within the news module clip.

Any help would be appreciated!
