
XML.parseXML() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
941
Description
The parentNode property returns a reference to the node object from which theNode
descends in the XML object hierarchy, where theNode can be an XML or XMLnode
instance. If
theNode is the top (root) node of the current hierarchy, parentNode returns null.
In this XML source fragment, the
MESSAGE node is the parentNode of text node “hey”:
<MESSAGE>hey</MESSAGE>
Here, the parentNode of the ROOM node is the HOTEL node:
<HOTEL><ROOM><SIZE>Double</SIZE></ROOM></HOTEL>
See Also
XML.childNodes, XML.firstChild, XML.lastChild, XML.previousSibling
XML.parseXML() Method
parse a string of XML source code
Flash 5
xmlDoc.parseXML(string)
Arguments
string A string of XML source code.
Description
The parseXML() method reads and parses the XML source contained by string, converts
that source into an object hierarchy, and then places the resulting hierarchy into
xmlDoc.
Any previous contents of
xmlDoc are replaced by the new hierarchy. 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). Once parsing is complete, the success of the operation can be
determined via
xmlDoc.status.
To include raw HTML or XML source code in a text node without parsing it, use a
CDATA section ...