New XML Object features of Flash Player 5 re-release
Version 5,0,41,0 (and above) of the Macromedia Flash Player 5 includes some enhancements and improvements to the XML Object. These new properties are not available in Flash's Test Movie mode. The new properties can only be tested in a Web browser with the latest version of Flash Player installed. This information applies to version 5,0,41,0 and later of Flash Player 5.
New property: contentType
The contentType property provides the ability to specify the Content-Type header for data sent to an application server using the XML Object's send orsendAndLoad methods. By default, this property is set to application/x-www-form-urlencoded.
Despite this default value, it is important to note that data sent using the XML object is actually not URL encoded. The default content type of 'application/x-www-form-urlencoded' is used to maintain compatibility with certain application servers, such as Active Server Pages, that require that heading.
To specify the content type for an instance of the XML object, use the following syntax:
myXML.contentType = "type/subtype";
Note: When using a application server to receive XML-formatted data from Flash, the contentType property might need to be changed to improve communication between Flash and the application server. For example, "application/xml" or"text/xml" are two other common content type descriptors for XML-formatted data.
New property: ignoreWhite
This property takes a TRUE or FALSE value and determines how Flash Player treats white space between XML tags. When set to TRUE, the white space between tags is ignored. When set to FALSE, all white space is respected.
Note: White space that appears within XML text nodes is considered to be significant.
HTML entity conversion
The following characters, when appearing in XML text nodes, are now converted to/from their HTML entity equivalents:
| Character | HTML entity |
| < | < |
| > | > |
| & | & |
| " | " |
| ' | ' |
Additional information
For information on detecting Flash Player major and minor version, see How to use the $version variable to determine Flash Player version (TechNote 14294) and ActionScript Dictionary : getVersion. For a complete Flash Player detection mechanism, download the Flash Detection Kit.
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
