cloneNode()

2000-08-25 Thread Martin Klang
Hi all, I've come across a problem when upgrading from xalan 1.1 to 1.2d01 - which uses Xerces 1.1.2. i'm storing Document objects in a cache after having parsed them, so i make a deep copy using doc.cloneNode(true); after the upgrade, it seems that clone() creates a Document w/o root element..

XML4C DOM cloneNode and casting question

2000-03-03 Thread Rahul Jain
> > b) What should be the correct way of down casting a DOM_Node to a > DOM_Element? I have run into this problem on several occasions where I get > a DOM_Node by using the DOM traversal functions and, after determining its > type to be DOM_Node::ELEMENT_NODE, I would like to start using it as a

Re: XML4C DOM cloneNode and casting question

2000-03-03 Thread David N Bertoni/CAM/Lotus
KRAUSE,MIKE (HP-FtCollins,ex1)" <[EMAIL PROTECTED]> on 03/02/2000 08:05:58 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David N Bertoni/CAM/Lotus) Subject: XML4C DOM cloneNode and casting question Hello, Given the following C++ function (which is suppo

XML4C DOM cloneNode and casting question

2000-03-03 Thread KRAUSE,MIKE (HP-FtCollins,ex1)
16:} 17: } 18: 19: if (!bfound) { 20:tmp_node = tmp_node.getNextSibling(); 21: } 22: } 23: } 24: } Can you tell me a) Should I be doing a shallow cloneNode on line 15 since tmp_node is only scoped by this function or will the copy constructor for

Re: Caching problem? (was: Re: cloneNode() eats memory?)

2000-02-13 Thread Christian . Lizell
emory > and run GC more often. Different JVM may also have differently sized initial > heaps and different heap size limits. > > george > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Christian Lizell > Sent: Friday, F

RE: Caching problem? (was: Re: cloneNode() eats memory?)

2000-02-11 Thread George T. Joseph
different heap size limits. george -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Christian Lizell Sent: Friday, February 11, 2000 4:46 AM To: [EMAIL PROTECTED] Subject: Caching problem? (was: Re: cloneNode() eats memory?) Hi! I have tried every possible

Re: Caching problem? (was: Re: cloneNode() eats memory?)

2000-02-11 Thread Christian Lizell
Hi again! After testing the same sample program as in my original posting "cloneNode() eats memory?" with the old xml4j classes I found that they did not eat the memory as the xerces-J classes do. This is the sample program: import org.w3c.dom.*; import com.ibm.xml.dom

Caching problem? (was: Re: cloneNode() eats memory?)

2000-02-11 Thread Christian Lizell
Hi! I have tried every possible way that I can think of in order to reclaim memory from a created node. Here is a very simple test case illustrating the problem: import org.w3c.dom.*; import org.apache.xerces.dom.*; public class CloneTest3 { public static void main(String[] args) {

Re: cloneNode() eats memory?

2000-02-08 Thread Christian Lizell
OK. I have the following document loaded in memory as a DOM: ... ... and repeatedly want to clone in order to manipulate it, but keep the original node. Shouldn't the memory be reclaimed in the code in my original example? I have attached an examp

Re: cloneNode() eats memory?

2000-02-08 Thread Andy Clark
Christian Lizell wrote: > Is it the correct behavior that the following statement > is not releasing the memory for the cloned node? > > Node clonedNode = someNode.cloneNode(true); > clonedNode = null; Unless the cloned node is actually a child node in the document, the cloned nod

cloneNode() eats memory?

2000-02-07 Thread Christian Lizell
Hi! Is it the correct behavior that the following statement is not releasing the memory for the cloned node? Node clonedNode = someNode.cloneNode(true); clonedNode = null; Besides the owner Document, what is linked to the cloned node? How can I restore the memory the cloned node

cloneNode() eats memory?

2000-02-07 Thread Christian Lizell
Hi! Is it the correct behavior that the following statement is not releasing the memory for the cloned node? Node clonedNode = someNode.cloneNode(true); clonedNode = null; Besides the owner Document, what is linked to the cloned node? How can I restore the memory the cloned node