Displaying 2 results from an estimated 2 matches for "_xmlhash".
2006 Mar 17
6
Updated the xml code to be more object-oriented
...LDoc. I may add more functionality to it later, hence the more
generic name, but you do something like this to convert XML to a hash:
XMLDoc = Class.create();
Object.extend(XMLDoc.prototype, {
initialize: function (xmlDoc) {
this.element = xmlDoc;
},
asHash: function () {
if (! this._xmlHash) {
this._xmlHash = this._nodeToHash(this.element);
}
return this._xmlHash;
},
_nodeToHash: function (node) {
Element.cleanWhitespace(node);
if ((node.attributes && node.attributes.length > 0)
|| (node.hasChildNodes() && node.childNodes[0].nodeType ==
1...
2006 Mar 23
4
XML parser fixed
..., options)
{
this.xmlFile = XMLFile;
this.options = options;
this.element = false;
this.XMLParsed = false;
this.getXml();
},
XMLHash: function ()
{
return this.XMLParsed;
},
asHash: function ()
{
if (! this._xmlHash) {
this._xmlHash = this._nodeToHash(this.element);
}
return this._xmlHash;
},
getXml: function ()
{
if(this.options.onLoading) {
this.options.onLoading();
}
new Ajax.Request(this.xmlFile, {method:''get'', o...