You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by La...@WellsFargo.COM on 2002/12/10 01:31:46 UTC
Size of DOM
Dear All:
I have DOM document in memory (an object of class Document from org.w3c.dom
package.) I want to find out the size of this DOM in memory. Also I want to
find out how many items does this DOM contain? Can anyone tell me the best
way to do so?
Thanks much.
Kaushik.
Re: Size of DOM
Posted by Joseph Kesselman <ke...@us.ibm.com>.
On Monday, 12/09/2002 at 04:31 PST, Lahoti.Kaushik@WellsFargo.COM wrote:
> I want to find out the size of this DOM in memory. Also I want to
> find out how many items does this DOM contain?
What do you mean by "size of this DOM in memory"? Number of charactes of
text content? Size of the actual objects? The latter is far outside XSLT's
domain...
What do you mean by "items"? Number of nodes? Number of elements? Number
of words in the text content? Depending on your definition we can probably
come up with an XPath which will return that value, but you might find
that writing a program to call the DOM APIs directly would be a good
alternative.
______________________________________
Joe Kesselman / IBM Research