
XMLNode Class
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
949
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
XMLNode Class
internal superclass of the XML class
Flash 5 (undocumented)
Description
The XMLNode class defines the core properties and methods of nodes in an XML object
hierarchy. Though XMLNode is internal to ActionScript, it can be used by programmers to
add to the default functionality of XML objects.
Technically, every XML object hierarchy includes two kinds of object nodes:
• One XML node, which serves as the main container for the hierarchy
• An arbitrary number of XMLNode nodes, which are the children of the main con-
tainer node
The main container node is an instance of the XML class. For example, if we create
myDoc
as follows:
myDoc = new XML();
then myDoc is an instance of the XML class. The XML class inherits from the XMLNode
class, so main container nodes have all the properties and methods defined by XMLNode
plus those defined by XML. In contrast, the children of
myDoc will actually be instances of
the XMLNode class, not the XML ...