# Information from XML depending on date

**URL:** <https://forum.kirupa.com/t/information-from-xml-depending-on-date/276981>\
**Category:** Uncategorized\
**Created:** [December 5, 2008, 11:27pm UTC](https://forum.kirupa.com/t/information-from-xml-depending-on-date/276981 "2008-12-05T23:27:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stylus\_se](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@stylus\_se](https://forum.kirupa.com/u/stylus_se)\
**Post date:** [December 5, 2008, 11:27pm UTC](https://forum.kirupa.com/t/information-from-xml-depending-on-date/276981/1 "2008-12-05T23:27:02Z")

</div>

Hello,

I´m in need of some help. I was wondering if its possible to get information from an xml-file depending on the date?  
Right now I have an xml-file that looks something like this:

```auto
<images>
 <image source="img.jpg" name="Example1" url="[http://www.google.se](http://www.google.se/)" date="6"></image>
</images>

```

And my actionscript looks something like this:

```auto
 
var xmlString:URLRequest = new URLRequest("img/images.xml");
var xmlLoader:URLLoader = new URLLoader(xmlString);
xmlLoader.addEventListener("complete", init);
function init(event:Event):void{
  var xDoc:XMLDocument = new XMLDocument();
  xDoc.ignoreWhite = true;
  var imagesXML:XML = XML(xmlLoader.data);
  xDoc.parseXML(imagesXML.toXMLString());
  trace(xDoc.firstChild.childNodes[0]);
}

```

Is it possible to have a dynamic textfield with todays date (getDate), and if it is the 6th of the month, it gets correct information from the xml-file?

Hope I was clear enough, english is not my native language.  
Thanks in advance.
