User Guide

166 Server-Side ActionScript Language Reference
Example
In the following example, the onLoad event is used to handle the WSDL parsing:
// Prepare the WSDL location:
var wsdlURI = "http://www.flash-db.com/services/ws/companyInfo.wsdl";
// Instantiate the web service object using the WSDL location:
stockService = new WebService(wsdlURI);
// Handle the WSDL parsing and web service instantiation event.
stockService.onLoad = function(wsdl){
wsdlField.text = wsdl;
}
XML class
Availability
Flash Media Server 2.
Description
The XML class lets you load, parse, send, build, and manipulate XML document trees.
You must use the constructor
new XML() to create an XML object before calling any method
of the XML class.
An XML document is represented in Flash by the XML class. Each element of the hierarchical
document is represented by an XMLNode object.
NOTE
The XML and XMLNode objects are modeled after the W3C DOM Level 1
Recommendation: That recommendation specifies a Node interface and a Document
interface. The Document interface inherits from the Node interface, and adds methods
such as
createElement() and createTextNode(). In ActionScript, the XML and XMLNode
objects are designed to divide functionality along similar lines.