search for: ashash

Displaying 3 results from an estimated 3 matches for "ashash".

Did you mean: ashish
2006 Mar 17
6
Updated the xml code to be more object-oriented
...-esque, and created a class called XMLDoc. 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() &amp...
2006 Mar 23
4
XML parser fixed
...rototype, { initialize: function (XMLFile, 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(...
2006 Jul 24
15
XML Question
I''ve got an XML file which is pretty well structured. I need to retrieve specific elements from that file to fill out empty HTML elements on a page. I think what I need is xPath? Or - is that overkill? Is there some easier way to locate an XML element? What I have in mind is pulling the XML file using Ajax, then xPath to get the bits I need. Am I on the right path and does