From Gnash Project Wiki

Jump to: navigation, search



As of Feb 9, 2006, I implemented the node creation methods for the XML class. All that is remaining to be done are the toString method, and the other two routines used to send XML data. -- rob

Now that the basic functionality has been moved to the XMLNode class, I'd like to use that as a base class for the XML class one of these days... The XML class implements the parser, whereas XNLNode just holds data.

It is also now possible to use the builtin ActionScript methods to build up a DOM tree of nodes with tags and content. createElement creates the tag, and then createTextNode becomes the data part of the XML.


  • properties:
    • contentType : String
    • docTypeDecl : String
    • idMap : Object
    • ignoreWhite : Boolean
    • loaded : Boolean
    • status : Number
    • xmlDecl : String
  • method XML::toString()
  • event onData: is coded but the code is not linked in anywhere.
  • event onLoad: appears from the code to be implemented.
  • event onHTTPStatus


  • method XML.load
  • method XML.parseXML
  • method XML.getBytesTotal
  • method XML.hasChildNodes
  • method XML.getBytesTotal
  • method XML.getBytesLoaded
  • method XML.appendChild
  • method XML.cloneNode
  • method XML.createElement
  • method XML.createTextElement
  • property XML::nodeName
  • property XML::nodeValue



The way this is currently implemented, it won't handle a true URL where it needs to grab a file off of another web site. This initial implementation is limited to reading disk files, or parsing XML messasges in memory.


This currently returns the size of the XML file or message correctly.


With the current limitation of disk or memory (network) based XML data, the bytes loaded is the same as the total bytes. When support for loading from a URL is added, this will then actually reflect the counts of how many bytes have been retrieved from the URL.


This correctly returns the number of children for the current XML node.


This correctly appends a node as a child to the XML node.


This correctly creates a new node with the specified node's data.


This correctly creates a new XMLNode. The value passed in becomes the tag name.


This correctly create a new Text node. The value passed in becomes the data part of the XML tag.