# Custom XML Parser Class

**URL:** <https://forum.kirupa.com/t/custom-xml-parser-class/219370>\
**Category:** flash\
**Created:** [March 15, 2007, 11:32pm UTC](https://forum.kirupa.com/t/custom-xml-parser-class/219370 "2007-03-15T23:32:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![deltajam](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@deltajam](https://forum.kirupa.com/u/deltajam)\
**Post date:** [March 15, 2007, 11:32pm UTC](https://forum.kirupa.com/t/custom-xml-parser-class/219370/1 "2007-03-15T23:32:37Z")

</div>

Ok. So everything works inside the class. I can trace my final data thats been sorted into objects and arrays. But again … this is inside the class. My problem is accessing this array ‘outside’ the class.

so my .fla file:

```auto

import as.classes.ParseXML;
var xml:ParseXML = new ParseXML("xml/earthday.xml");
 
trace(xml.datax);

```

and a piece of my class file:

```auto

 private function onXMLLoaded(contentXML:XML):Void {
  // Parse through the XML.
  xmlArray = new Array();
  var node:Object = contentXML.firstChild.firstChild;
  while (node != null) {
   var newReturn:Array = xmlNodesToArray(node);
   xmlArray.push(newReturn);
   node = node.nextSibling;
  }
 
  trace(datax);
 
 }
 
 public function get datax() {
  return xmlArray;
 }

```

any ideas? I know this has to be simple … ☹
