User Guide
XML class 211
Example
The following example creates an XML packet and then deletes the specified XML object and
its descendant nodes:
var xml_str = "<state name=\"California\">
<city>San Francisco</city></state>";
var my_xml = new XML(xml_str);
var cityNode = my_xml.firstChild.firstChild;
trace("before XML.removeNode():\n"+my_xml);
cityNode.removeNode();
trace("");
trace("after XML.removeNode():\n"+my_xml);
/* output (line breaks added for clarity):
before XML.removeNode():
<state name="California">
<city>San Francisco</city>
</state>
after XML.removeNode():
<state name="California" />
*/
XML.send()
Availability
Flash Media Server 2.
Usage
my_xml.send(url, [fileObj])
Parameters
url A string; the destination URL for the specified XML object.
fileObj File; (optional) a File object, that is not read-only, to which the response is written.
If the File object is not open, Flash Media Server opens the file, writes to the file, and closes
the file. If the File object is open, Flash Media Server writes to the file and leaves the file open.
NOTE
In Flash Media Server, the output of trace() statements appears in the application log
file and Application inspector.