Using Xalan Java for processing XML with XSLT

Xalan Java is an XSLT processor. With this processor you can transform the XML document in to other formats as required by your application. You can use this processor from within your program or in command line. It can also be integrated in other programs. It implements XSLT version 1.0, XPath version 1.0, and JAXP 1.3.


_______________________________________________

To work with the Xalan Java XSLT processor you have to download it and set the classpath to the jar files xalan.jar, xml-apis.jar, serializer.jar, and xercesImpl.jar.

Now to use the processor you have to call the Process class in the command line while calling java. A typical command line command would be something like, java org.apache.xalan.xslt.Process -IN ur_xml_file.xml -XSL ur_xsl_file.xsl -OUT ur_output.out

In the command line you can find the flags -IN is used to specify the XML file that you want to transform and the -XSL is used to specify the XSL file that is used for the transformation.

Suppose you want only the text values of the elements to be included in the output you can use the flag -TEXT. To write HTML, you can use the flag -HTML. Check the documentation for the other flags that might be applicable to your application.




_______________________________________________

FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

_______________________________________








 

 

FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.

 

 

Add to My Yahoo!

Visit XML Training Material Guide Homepage

 

 

Copyright - © 2004 - 2017 - All Rights Reserved.