Displaying 2 results from an estimated 2 matches for "_subnodetohash".
2006 Mar 17
6
Updated the xml code to be more object-oriented
...mp;& node.childNodes[0].nodeType ==
1)) {
var localHash = {};
if (node.attributes && node.attributes.length >= 1) {
$A(node.attributes).each(function (attr) {
localHash[attr.nodeName] = [attr.nodeValue]; });
}
$A(node.childNodes).each(function (node) {
this._subNodeToHash(localHash, node); }.bindAsEventListener(this));
$H(localHash).each( function (pair) { if
(localHash[pair[0]].length == 1) { localHash[pair[0]] =
localHash[pair[0]][0]; } });
return localHash;
}
else {
return this._nodeAsText(node);
}
},
_subNodeToHash: function (hash...
2006 Mar 23
4
XML parser fixed
...localHash[attr.nodeName] = [attr.nodeValue];
});
}
if (node.hasChildNodes() && (node.childNodes[0].nodeType == 1 || node.childNodes[0].nodeType == 7)) {
$A(node.childNodes).each(function (node) {
this._subNodeToHash(localHash, node);
}.bindAsEventListener(this));
}
else if (node.hasChildNodes()) {
localHash[''text''] = [this._nodeAsText(node)];
}
$H(localHash).each( function (pair) {
if (pair[1].le...