xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lahoti.Kaus...@WellsFargo.COM
Subject RE: Reducing XML transformation time
Date Tue, 24 Dec 2002 19:34:10 GMT
No I do not create DOM from the actual file. I referred to "number of lines"
because I print the DOM (document) object to a file (by converting it to
string)and see how much I have reduced the size of the DOM. 

Can you please describe how I can use SAX instead of DOM? I mean is it that
easy a change? Also, please remember that I am using Xalan 1.0.1 and Xerces
1.0.3 which are the oldest versions.

Thanks.
Kaushik.

-----Original Message-----
From: Peter Davis [mailto:pdavis@pdavis.cx]
Sent: Tuesday, December 24, 2002 1:53 AM
To: Lahoti.Kaushik@WellsFargo.COM; xalan-j-users@xml.apache.org
Subject: Re: Reducing XML transformation time


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 23 December 2002 16:47, Lahoti.Kaushik@WellsFargo.COM wrote:
> constructing new DOM and passed this DOM to the
> transformation method.

If you can, avoid using a DOM altogether and use SAX instead; at least for
the 
input.  I assume you are creating your DOM from an actual XML file since you

refer to the number of "lines", so using SAX input should work unless you do

some other pre-processing, which maybe you can or should avoid as well.

Xalan uses a custom "DTM" data model which it creates directly from SAX 
streams, but for DOMs it must create a "DTM wrapper" which cannot be as 
efficiently optimized and which creates another layer of innefficiency.

- -- 
Peter Davis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+CC5xhDAgUT1yirARAus+AJ427fQcUcobSlOdy6P83nRWT77qZgCeP3Wd
sW9/XZQH7QFlJ7JCf8OBCW0=
=YqZZ
-----END PGP SIGNATURE-----

Mime
View raw message