# Dynamic Remote XML Loading Problem

**URL:** <https://forum.kirupa.com/t/dynamic-remote-xml-loading-problem/209663>\
**Category:** flash\
**Created:** [December 11, 2006, 12:04pm UTC](https://forum.kirupa.com/t/dynamic-remote-xml-loading-problem/209663 "2006-12-11T12:04:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![biznuge](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/biznuge/32/11567_2.png) [@biznuge](https://forum.kirupa.com/u/biznuge)\
**Post date:** [December 11, 2006, 12:04pm UTC](https://forum.kirupa.com/t/dynamic-remote-xml-loading-problem/209663/1 "2006-12-11T12:04:11Z")

</div>

Hi All,

I have a problem with loading externally generated XML, which seems to work fine locally…

here’s the XML code from my actionscript:-

```auto
[COLOR=green]XMLFile[/COLOR] = "http://remoteXMLGenerator.asp";
[COLOR=purple]XML_Publish[/COLOR] = [COLOR=blue]new XML();[/COLOR]
[COLOR=purple]XML_Publish[/COLOR].[COLOR=blue]onLoad[/COLOR] = [COLOR=red]myLoad[/COLOR];
[COLOR=purple]XML_Publish[/COLOR].[COLOR=blue]load[/COLOR]([COLOR=green]XMLFile[/COLOR]);
 
[COLOR=blue]function[/COLOR] [COLOR=red]myLoad[/COLOR]([COLOR=darkorchid]ok[/COLOR])
{
 if ([COLOR=darkorchid]ok[/COLOR] == [COLOR=blue]true[/COLOR])
 {     
  [COLOR=red]Publish[/COLOR]([COLOR=blue]this.firstChild[/COLOR]);
  traceout.[COLOR=blue]text[/COLOR] = "XML SEEMS FINE!";
 }else{
  traceout.[COLOR=blue]text [/COLOR]= "problems were encountered";
 }
}
[COLOR=blue]function[/COLOR] [COLOR=red]Publish[/COLOR]([COLOR=purple]XMLnode[/COLOR])
{  
 [COLOR=blue]while[/COLOR] ([COLOR=purple]XMLnode[/COLOR] != [COLOR=blue]null[/COLOR])
 {.... [COLOR=darkorange]parsing coding[/COLOR]

```

Not sure how to introduce a loop to continually check if the XML is loaded, or even whether I should be using [COLOR=blue]onData[/COLOR] and [COLOR=blue]data, [/COLOR][COLOR=black]but I just tried a basic tutorial from an O’Reilly book, and it seems like onData should only be used as an intermediate, after the XML is loaded… :crazy: [/COLOR]

Any help or point in the right direction would be appreciated here guys…

Real PROBLEM is the 5-10 second intermediate lag it takes, for the external XML generator to poll a bunch of CITRIX servers for their terminal availability before rendering out the XML data.

THX
