"Timm, Sean" wrote: > I've got a method that gets passed in a document object. When I > call it the first time, the getLength call returns 4. I remove > a node based on some criteria. Later on, this function gets > called again and the same document is passed in. This second > time, the getLength call *also* returns 4 (instead of 3 like I > would expect). However, node.item[3] is now null. I haven't > traced it through the Xerces calls, but it looks like removeChild > is supposed to call changed() which flags it to update on the > getLength() call...is there something I'm missing?
The method removeChild() throws an exception in NodeImpl. And ElementImpl gets its behavior for removeChild from NodeContainer. The current code in CVS does call changed(). Check the code in NodeContainer#internalRemoveChild(Node,int):Node. The only way that it wouldn't call this method is if an exception occurred. -- Andy Clark * IBM, JTC - Silicon Valley * [EMAIL PROTECTED]
