|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Converting Document object (DOM) into inputsource for XSL pr
Hi folks, Currently, I'm working with DOM (SUN project X implementation) as a represention of my Object. As I wish to submit the source tree through an XSL style sheet using XT (for performance reason), I do need to convert the DOM object into it equivalent inputsource as expressed in the above java code : ByteArrayOutputStream docOutputStream = new ByteArrayOutputStream(); ((XmlDocument)myDOMDocument).write(docOutputStream); ByteArrayInputStream docInputStream = new ByteArrayInputStream(docOutputStream.toByteArray()); InputSource inputSource = new InputSource(docInputStream); myXslProcessor.parse(inputSource); Is there a better way to handle these opreations, since they're time consuming in resource and memory. Beside this, I tried using DOM directly with XSL:P processor, but it wasn't faster than XT solution, so I'm deducting that it take longer to work with DOM that to parse again the XML document and then work with it internal and lightweight representation, is it true ? Thank for any reply, I would really appreciate. Sebastien Sahuc ssahuc@xxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








