Just a curiosity about XML

Just a curiosity about XML

Maybe you already know what I am going to write here, if not, I hope it is a useful info.
In Internet Explorer to know if a node, a generic one, is XML, root and XML document included, is simple as is this operation:
// let say node is an XML node
try {
    node[expando] = null;
    var isXMLNode = false;
    delete node[expando];
} catch(e) {
    var isXMLNode = true;
};
that's it, in IE it is not possible to assign properties as is for xHTML, which kinda means that to associate an XML node to another one it is not possible to create a reference in the node while a specific id, let say its index in an array of nodes, will be the way.
var id = collection.push(otherNode) - 1;
node.setAttribute(expando, id);
// otherNode reachable via
// collection[node.getAttribute(expando)]
I guess in IE XML does not suffer that much memory leaks, run-time closures a part.
Regards