trace(doc);
// output (with line breaks added between tags):
// <element1>
// <element2>textNode1 String value</element2>
// <element3>textNode2 String value</element3>
// </element1>
See also
createElement (XML.createElement method)
docTypeDecl (XML.docTypeDecl property)
public docTypeDecl : String
Specifies information about the XML document's
declaration. After the XML text
DOCTYPE
has been parsed into an XML object, the
property of the XML object is set
XML.docTypeDecl
to the text of the XML document's
declaration (for example,
DOCTYPE
<!DOCTYPEgreeting
). This property is set using a string representation of the
SYSTEM "hello.dtd">
DOCTYPE
declaration, not an XML node object.
The ActionScript XML parser is not a validating parser. The
declaration is read by
DOCTYPE
the parser and stored in the
property, but no Dtd validation is performed.
XML.docTypeDecl
If no
declaration was encountered during a parse operation, the
DOCTYPE
XML.docTypeDecl
property is set to
. The
method outputs the contents of
undefined
XML.toString()
immediately after the XML declaration stored in
, and
XML.docTypeDecl
XML.xmlDecl
before any other text in the XML object. If
is undefined, no
XML.docTypeDecl
DOCTYPE
declaration is output.
Availability: ActionScript 1.0; Flash Player 5
Example
The following example uses the
property to set the
declaration
XML.docTypeDecl
DOCTYPE
for an XML object:
my_xml.docTypeDecl = "<!DOCTYPE greeting SYSTEM \"hello.dtd\">";
See also
xmlDecl (XML.xmlDecl property)
XML
1293
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?