xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Elliotte Harold <elharo AT metalab.unc.edu>
- To: Luca Passani <passani AT eunet.no>
- Cc: xom-interest <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] XML "size"
- Date: Thu, 12 May 2005 08:18:36 -0400
Luca Passani wrote:
Hi Guys
here is another question which will probably irritate some of you, as usual, but which is relevant to those who need to make XML do something useful. Is there a way to ask an element how big it and all of its children are (in bytes)?
No, for several reasons. Among them XML is defined in terms of characters not bytes, there are multiple representations of the same infoset in character sequences of different lengths, and different VMs have different per-object overheads.
I can think of asking the element to render itself as a string, and measure the size of that, but it sounds like this would not be very efficient performance wise. Is there a way for me to create a new field to the Node() class and traverse the Object model bottom-up to assign the right value to the field?
Short of forking the code, you can't do that.
--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
-
[XOM-interest] XML "size",
Luca Passani, 05/12/2005
-
Re: [XOM-interest] XML "size",
Elliotte Harold, 05/12/2005
-
Re: [XOM-interest] XML "size",
Noam Tamim, 05/12/2005
- Re: [XOM-interest] XML "size", Elliotte Harold, 05/12/2005
-
Re: [XOM-interest] XML "size",
Luca Passani, 05/12/2005
-
Re: [XOM-interest] XML "size",
Wolfgang Hoschek, 05/12/2005
-
Re: [XOM-interest] XML "size",
Luca Passani, 05/12/2005
- Re: [XOM-interest] XML "size", Wolfgang Hoschek, 05/12/2005
-
Re: [XOM-interest] XML "size",
Luca Passani, 05/12/2005
-
Re: [XOM-interest] XML "size",
Wolfgang Hoschek, 05/12/2005
-
Re: [XOM-interest] XML "size",
Noam Tamim, 05/12/2005
-
Re: [XOM-interest] XML "size",
Elliotte Harold, 05/12/2005
Archive powered by MHonArc 2.6.24.