X-Z > XML.xmlDecl

XML.xmlDecl

Syntax

myXML.xmlDecl;

Arguments

None.

Description

Property; sets and returns information about a document's XML declaration. After the XML document is parsed into an XML object, this property is set using 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 was encountered during a parse operation, the property is set to undefined. XML.toString outputs the contents of XML.xmlDecl before any other text in the XML object. If XML.xmlDecl contains the undefined type, no XML declaration is output.

Player

Flash 5 or later.

Example

The following example uses XML.xmlDecl to set the XML document declaration for an XML object:

myXML.xmlDecl = "<?xml version=\"1.0\" ?>";

See also

XML.toString
XML.docTypeDecl