Click to See Complete Forum and Search --> : XMLNode

05-11-2001, 03:15 PM
Has anyone seen all the methods and properties of the XMLNode object documented anywhere ( yes, XMLNode, not XML or XMLSocket ). My understanding is that it is a seperate object from the XML object and that it has some noticeable differences but I have been unable to find any real information about it. Thanks for your time.


05-11-2001, 03:27 PM
mikebrittain in his earlier "Extending the XML Object" thread managed to get a list of the XMLNode properties and collections with some "typeof" trickery. re-listing those here now:

XMLNode properties -

XMLNode collections -

But a full list of methods still hasn't been found. I am expecting these to be similar to the list of methods of the XML object ( with the exceptions being similar to the missing properties, namely no load or onLoad method ) but before I start testing this one at a time has anyone already made a list of the methods?


05-11-2001, 05:24 PM
After some testing, it appears that the XMLNode and XML objects aren't truly seperate unique classes. XML inherits the XMLNode class and extends it with additional properties and methods. I found this by adding a new test function to the XMLNode prototype.

XMLNode.prototype.testing = function () {
return "I am a XMLNode object";

After that was added, when I created a new instance of the XMLNode prototype and called the .testing function it returned the string seen above. After some testing I found that I got the same result when I made a new XML instance and called the testing function from it. To differentiate between the two I then added a function specifically to the XML object.

XML.prototype.testing2 = function () {
return "I am a XML object";

After testing that and finding the function only existed in the XML object it proved, to my satisfaction at least, that the XML object is an extended version of the XMLNode object.

This may be old news. I don't know who else beyond mikebrittain, and the people FlashGuru did some work with over on the flashmove.com message board, have worked on extending the XML class to make it a bit easier to use.

It appears, so far at least, that the only XML document specific items are:

Properties: docTypeDecl, status, xmlDecl
Methods: load, onLoad, parseXML, send, sendAndLoad

I may be wrong about that being the only XML object exclusive items, I am still working on testing everything to the point that I feel confident I didn't miss anything. If this is all old news or if you find somewhere that I made an error please post. Thanks.


05-11-2001, 11:00 PM
Hythian -- We already talked a little by email about this stuff. Good coverage of the material here, though. I would agree with what you've listed here by my own research a week ago.

It absolutely fits that XML should inherit XMLNode. According to the DOM spec from the W3C, most elements (I should really say classes here) in the XML DOM inherit from a generic "node" class I think. The "typeof" testing that I did (you refered to it in one of your posts) covered a lot of names that are similar to those of classes in the W3C's DOM spec -- including mixed case versions, and versions with leading underscores. I will try to publish the list that I tested here, along with the .fla file so that if anyone is so inclined, they might try to research further.

I'm somewhat convinced that with the generic nature of the implementation in Flash right now for XML, there may not have been a need in development to include any other XML-related classes. Perhaps in Flash 6 we'll see a larger range.

05-11-2001, 11:03 PM
Wanted to make sure that you saw this thread earlier: