You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Da...@lhsl.com on 2001/02/02 23:08:58 UTC

eternal loop

I just ran into this strange situation where if you call a node's
insertBefore() method on itself (I know this is stupid, but it happened on
accident) Xerces v1.3.0 will go into an eternal loop in NodeImpl::changed
(). For  example:

DOM_Element node;
node.insertBefore(node);  // eternal loop

I don't know if you guys might want to check for this and throw a
HIERARCHY_REQUEST_ERR or something. It's a situation the user should be
aware of and avoid, but if he makes a dumb mistake an exception may be
preferable to the eternal almighty. ;-)

Thanks