Description
Method; parses the XML text specified in the
XML object with the resulting XML tree. Any existing trees in the XML object are discarded.
Example
The following example creates and parses an XML packet:
var xml_str = "<state name=\"California\">
<city>San Francisco</city></state>"
// Defining the XML source within the XML constructor:
var my1_xml = new XML(xml_str);
trace(my1_xml.firstChild.attributes.name); // output: California
// Defining the XML source using the XML.parseXML method:
var my2_xml = new XML();
my2_xml.parseXML(xml_str);
trace(my2_xml.firstChild.attributes.name);
// output: California
In Flash Media Server, the output of
file and Application inspector.
XML.prefix
Availability
Flash Media Server 2.
Usage
my_xml.prefix
Description
Property (read-only); the prefix portion of the XML node name. For example, in the node
<contact:mailbox/>bob@example.com</contact:mailbox> the prefix "contact" and the local
name "mailbox", comprise the full element name contact.mailbox.
208
Server-Side ActionScript Language Reference
parameter and populates the specified
source
statements appears in the application log
trace()
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?