Displaying 2 results from an estimated 2 matches for "_nodeastext".
2006 Mar 17
6
Updated the xml code to be more object-oriented
...(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, node) {
if (node.nodeType == 2) {
hash[node.localName] = this._nodeAsText(node);
}
else {
var key = node.tagName;
if (hash[key]) {
hash[key].push(this._nodeToHash(node));
}
else {
hash[key] = [ this._n...
2006 Mar 23
4
XML parser fixed
...odeType == 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].length == 1 && typeof pair[1][0] == ''string'') {
localHash[pair[0]] = pair[1][0];
}
});
return localHash;...