Doctypedecl (Xml.doctypedecl Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example creates two XML text nodes using the
method,
createTextNode()
and places them into existing XML nodes:
// create an XML document
var doc:XML = new XML();
// create three XML nodes using createElement()
var element1:XMLNode = doc.createElement("element1");
var element2:XMLNode = doc.createElement("element2");
var element3:XMLNode = doc.createElement("element3");
// place the new nodes into the XML tree
doc.appendChild(element1);
element1.appendChild(element2);
element1.appendChild(element3);
// create two XML text nodes using createTextNode()
var textNode1:XMLNode = doc.createTextNode("textNode1 String value");
var textNode2:XMLNode = doc.createTextNode("textNode2 String value");
// place the new nodes into the XML tree
element2.appendChild(textNode1);
element3.appendChild(textNode2);
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
XML
723

Advertisement

Table of Contents
loading

Table of Contents