XML.xmlDecl Property | Flash 5 |
the document's XML declaration tag | read/write |
The string xmlDecl property represents the XML declaration tag of xmlDoc, if any exists. Otherwise, xmlDecl is undefined. The specified xmlDoc must be the top-level node in an XML object hierarchy (i.e., an instance of the XML class, not the XMLnode class).
The XML declaration tag of an XML document is used to identify the version of XML being used in the document. We use the XML declaration tag to build well-formed XML documents that can be validated externally.
// A well-formed document (but not validated against a DTD) myXML = new XML('<?xml version="1.0"?><P>this is a short document</P>'); trace(myXML.xmlDecl); // Displays: "<?xml version="1.0"?>" // Set a new XML declaration myXML.xmlDecl = '<?xml version="1.0" standalone="no"?>';