# Loading XML, how does it work?

**URL:** https://forum.kirupa.com/t/loading-xml-how-does-it-work/241984
**Category:** flash
**Created:** [October 20, 2007, 12:15pm UTC](https://forum.kirupa.com/t/loading-xml-how-does-it-work/241984 "2007-10-20T12:15:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![superbungalow](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@superbungalow](https://forum.kirupa.com/u/superbungalow)
#### Post date: [October 20, 2007, 12:15pm UTC](https://forum.kirupa.com/t/loading-xml-how-does-it-work/241984/1 "2007-10-20T12:15:59Z")

</div>

I’ve been learning about XML in AS2 lately, and I’ve started the “Displaying XML Data in Flash” tutorial, but there is something i don’t get:

```auto
function loadXML(loaded) { if (loaded) { _root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue; _root.comments = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue; name_txt.text = _root.inventor; comment_txt.text = _root.comments; } else { trace("file not loaded!");}} xmlData = new XML(); xmlData.ignoreWhite = true; xmlData.onLoad = loadXML; xmlData.load("inventors.xml");

```

How does Flash know the XML is loaded? I don’t see how Flash tells the loadXML function it’s loaded. Where is Flash told what “loaded” is equal to? Can anyone help me out please?
