User Guide

180 Server-Side ActionScript Language Reference
trace(doc);
// Output (with line breaks added between tags):
// <element1>
// <element2>textNode1</element2>
// <element3>textNode2</element3>
// </element1>
See also
XML.createElement()
XML.docTypeDecl
Availability
Flash Media Server 2.
Usage
my_xml.docTypeDecl
Description
Property; specifies information about the XML document’s DOCTYPE declaration. After the
XML text has been parsed into an XML object, the
XML.docTypeDecl property of the XML
object is set to the text of the XML document’s
DOCTYPE declaration (for example, <!DOCTYPE
greeting SYSTEM "hello.dtd">). This property is set using a string representation of
the
DOCTYPE declaration, not an XMLNode object.
The ActionScript XML parser is not a validating parser. The
DOCTYPE declaration is read by
the parser and stored in the
XML.docTypeDecl property, but no DTD validation is
performed.
If no
DOCTYPE declaration occurs during a parse operation, the XML.docTypeDecl property is
set to
undefined. The XML.toString() method outputs the contents of XML.docTypeDecl
immediately after the XML declaration stored in
XML.xmlDecl and before any other text in
the XML object. If
XML.docTypeDecl is undefined, there is no DOCTYPE declaration.
Example
The following example uses the XML.docTypeDecl property to set the DOCTYPE declaration
for an XML object:
my_xml.docTypeDecl = "<!DOCTYPE greeting SYSTEM \"hello.dtd\">";
See also
XML.toString(), XML.xmlDecl
NOTE
In Flash Media Server, the output of trace() statements appears in the application log
file and Application inspector.