From: Stefan S. <ste...@or...> - 2003-01-31 19:11:59
|
I'v the impression that Node/Attribute containers could/should be avoided, at least in the DOM programming model: Once you get hold of a node, you may iterate over the child nodes by means of an iterator, avoiding unnecessary copies (of pointers, but still...) The only context in which I can see the need for a 'NodeList' is when you search for matching nodes in a document (using xpath expressions, say), so the result will be a temporary list. The SaxParser uses an 'AttributeMap', containing Attribute pointers. Given that an 'Attribute' is now a wrapper around a node (which is by design associated with the DOM programming model), I suggest we replace that with a simple pair of (unicode) strings. The current implementation will leak, as there is no way to delete attributes outside a document (again, by design, because Attributes live in the context of a document, which doesn't exist with SAX). Suggestions ? Stefan |