Xmldecl (Xml.xmldecl Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example creates a new, empty XML object:
var my_xml:XML = new XML();
The following example creates an XML object by parsing the XML text specified in the
parameter, and populates the newly created XML object with the resulting XML
source
document tree:
var other_xml:XML = new XML("<state name=\"California\"><city>San
Francisco</city></state>");
See also
createElement (XML.createElement method)
method)

xmlDecl (XML.xmlDecl property)

public xmlDecl :
A string that specifies information about a document's XML declaration. After the XML
document is parsed into an XML object, this property is set to the text of the document's
XML declaration. This property is set using a string representation of the XML declaration,
not an XML node object. If no XML declaration is encountered during a parse operation, the
property is set to
undefined
property before any other text in the XML object. If the
XML.xmlDecl
contains the
undefined
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example creates a text field called
Stage. The text field displays properties of the XML packet that loads into the SWF file. The
doc type declaration displays in
file:
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "_typewriter";
my_fmt.size = 12;
my_fmt.leftMargin = 10;
this.createTextField("my_txt", this.getNextHighestDepth(), 0, 0,
Stage.width, Stage.height);
my_txt.border = true;
my_txt.multiline = true;
my_txt.wordWrap = true;
String
.
The
XML.
XML.toString()
type, no XML declaration is output.
. Add the following ActionScript to your FLA or AS
my_txt
,
createTextNode (XML.createTextNode
method outputs the contents of the
that has the same dimensions as the
my_txt
property
XML.xmlDecl
XML
737

Advertisement

Table of Contents
loading

Table of Contents