XES - Programmers Guide - Translating

 

it uses the javax.xml.transform class library.

I think the main stages are, first create a Transformer from the xsl file:

      Transformer xform = tfactory.newTransformer(new StreamSource(is));

Then create a dom tree from the nodes stored in the program:

      DOMSource ds=new DOMSource(root);

Then run the transform:

      xform.transform(ds,new StreamResult(outFile));

It is very inefficient because it needs to create a dom tree which duplicates all the information in the nodes, if you can think of a way to avoid creating this dom tree I would be very interested. Of course I would be interested in any ways to improve the program.


metadata block
see also:
Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

cover Processing XML with Java: A Guide to SAX, DOM, JDOM, JAXP, and TrAX

Other Java books

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to this site, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.

cover JBuilder - There is also a free version of Jbuilder at borland website . However its licence conditions are quite restrictive so you may prefer another java IDE.

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2015 Martin John Baker - All rights reserved - privacy policy.