[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Performance benefit in using DOMResult?

Subject: Performance benefit in using DOMResult?
From: "Vishwajit Pantvaidya" <pantvaidya@xxxxxxxxxxx>
Date: Tue, 26 Apr 2005 20:20:15 -0700
using domresult
In my code that calls transformer.transform (using xalan transformer) to do xslt transformation, I was using StreamSource and StreamResult till now. But now I have a requirement to do further checks on the output xml to see if it has some specific nodes and if yes, then create xml string from those nodes. Since DOM will allow me to access random nodes directly, I feel that I need a DOM tree of the output xml.

One option is to continue using StreamResult and parse the xml again using DOM/SAX. But here it seems like I would be unnecessarily reparsing the output xml. So instead, I am thinking of replacing StreamResult by DOMResult. I can then carry out the further checks on the output DOM tree. The expected benefit is:
1. avoiding reparsing of transformed output xml
2. hopefully leverage the result tree that the transformer creates internally i.e. no DOM tree creation from scratch


Can someone tell me if pt 2 is even a possibility?

Will using DOMResult still result in a conversion from the internal tree structure to the DOM tree? Is there anyway to avoid this? If none, I presume I will still be better off since I still avoid reparsing the output xml.

Thanks,

Vish.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.