Access keys

XMLWorker

Kind of class: class
Inherits from: Dispatcher
Classpath: org.asapframework.util.xml.XMLWorker
File last modified: Monday, 06 November 2006, 08:09:16
A worker class for XML that sends an "onXMLLoaded" message when XML has been loaded.

XMLWorker is used interally by XMLLoader and should not be used by itself.
Events broadcast to listeners:
onXMLLoaded event to XMLLoader
onXMLTimeout event to XMLLoader

Constructor

XMLWorker

function XMLWorker (
inURL:String, inName:String, inNoCache:Boolean, inTimeOut:Number)
Creates a new XMLWorker object.
Parameters:
inURL :
The URL of the xml file
inName :
Unique identifier; this name will also be used in callback events when file was loaded or when an error was encountered.
inNoCache:
If set to true, the xml file (if loaded over http, so this setting is ignored for local files) will always be fetched from the server by appending a timestamp to the call, thus circumventing the local browser cache. The URL will be extended with a param named 'asapts'.
inTimeOut:
Set value to specify time to wait (in milliseconds) for a server response (excluding the download time of the actual XML data itself). Defaults to 10 seconds if no value is specified. Set to '0' to disable timeout.

Instance properties

loaded

loaded:Boolean
(read,write)

loading

loading:Boolean
(read,write)

name

name:String
(read,write)

noCache

noCache:Boolean
(read,write)

result

result:Boolean
(read,write)

status

status:Number
(read,write)

timeout

timeout:Number
(read,write)

url

url:String
(read,write)

xml

xml:XML
(read)
The XML data.

Instance methods

load

function load (
) : Void
Starts loading the XML file.

Event handlers

onEnterFrame

function onEnterFrame (
e:FramePulseEvent) : Void
Triggered by FramePulse class.

onXMLloaded

function onXMLloaded (
inResult:Boolean) : Void
Triggered when XML has been loaded.
Events broadcast to listeners:
onXMLLoaded event to XMLLoader

onXMLTimeout

function onXMLTimeout (
) : Void
Triggered if no response from server was received within timeout interval.
Events broadcast to listeners:
onXMLTimeout event to XMLLoader