|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: How to speed up parsing ??
OK, it seems like you are using Java right?
(java -ms25M -mx100M xslFileName xmlFileName > directingOutput.txt)
You can parse the document and create a Document object
DOMParser parser = new DOMParser();
parser.parse("D:/foo.xml");
/* You can parse a File or an InputSource, if you have InputStream then just do InputSource s = new InputSource(InputStream) thing. */
Document document = parser.getDocument();
This Document object is parsed XML. You should store this in memory (Session/whatever else)if you repeatedly need it!
Also if you repeatedly need the same XSL file you should use some caching mechanism.
Also, XSL files after parsing can be represented by Templates objects
TransformerFactory tFactory = TransformerFactory.newInstance();
Templates t = tFactory.newTemplates(xslSource);
Transformer transformer = t.newTransformer();
these Templates object can be stored in a HashTable in session or something and retrieved when this particular XSL is called again.
This will reduce time. If you need more info, please mail me directly at tengshe.ashish@xxxxxxxxxxxxx
Lastly, try Translets, I've had better results working with large documents (Refer to Mukul Gandhi's post XSLTC)
Thanks,
Ashish
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








