[EMAIL PROTECTED] wrote:
Hi,
We have a requirement to perform series of transformations and most of
the time, our input XML and XSLT file will be different.
We know that Xalan provides interface to perform the transformation on
DOM and XML file. Wanted to know which option will be good in terms of
performance. Our end application will be running on network elements
with low memory.
So can someone give me the pros and cons of DOM and XML file
transformation in terms of memory and time?
Xalan-C parses an XML file into its internal source tree model, so the
representation of the entire XML document will be in memory. Xalan-C can
also wrap the Xerces-C DOM, but it's not very efficient, and never
recommended unless you really need to do that.
Also, currently XSLT returns the actual transformation result. Does
Xalan provides interface the return value of XSLT?
I'm not sure what you mean by XSLT. If you mean can Xalan-C generate an
instance of its source tree, so you can chain transformations, then the
answer is yes. This is more efficient in terms of processing power, since
the resulting serialized XML document doesn't have to be parsed to process
it, but uses more memory, because you will end up with two source trees in
memory at the same time.
Dave