XML.xmlDecl Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
XML.xmlDecl Property Flash 5

the document's XML declaration tag read/write
xmlDoc.xmlDecl

Description

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.

Example

// 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"?>';

See Also

XML.docTypeDecl



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net