Processing XML documents with Java and XSL

There are many approaches to process the XML document using Java and XSL. One of the ways is to use the Xalan Java XSLT processor. To use this XSLT processor you have to download it and set the classpath to some of the jar files.

_______________________________________________


_______________________________________________

The jar files that are to be included in the classpath are xalan.jar, xml-apis.jar, serializer.jar, and xercesImpl.jar. You can also work with the Xalan Java XSLT processor from the command line by calling java and the Process class.

A typical command line command would be,
java org.apache.xalan.xslt.Process -IN ur_xml_file.xml -XSL ur_xsl_file.xsl -OUT ur_output.out

There are many command line flags that can be used to give an appropriate output. For example if you want the output to include only the text values of the elements instead of the element names, you could use the -TEXT option.

To output the HTML you can use the -HTML option. In the example given above you can find the flags -IN and -XSL are used to input the XML file you want to transform and the XSL file that is used for the transformation.

Linked by Thom Holwerda on Thu 6th Oct 2005 11:05 UTC (New Mobile Computing)
The Servlet-Based Content Creation Framework is an easy-used and easily-understood compact, content creation framework utilizing hamlets; a servlet extension that reads XHTML and uses the simple API for XML. Read this article on introducing Hamlets and learn how they can be used to separate Java and HTML in the same source file.

Enterprise Data Integration: Business Boon or Budget Breaker? (SYS-CON Media)
Data is king in today's information-driven economy, which is why organizations are willing to spend tens or even hundreds of thousands of dollars on data integration frameworks and applications. These organizations understand two critical truths: they have yet to capitalize on the potential business value stored in relational databases, EDI, flat files, and XML-based systems; and they must ...

Software Review: XMLSpy 2008 From Altova (Blogcritics.org)
If you work with XML with any regularity then you need to do yourself a favor and check out XMLSpy 2008. XMLSpy 2008 is the latest version of Altova's integrated development environment (IDE) for XML. XMLSpy allows programmers to create XML-based applications and Web services in a more dynamic and easier to understand environment. The version that I am reviewing is XMLSpy 2008 release 2 which ...



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.

_______________________________________

Recommended XML Books

cover
cover
cover
cover
cover
cover






 

 

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!


New XML Books Titles - Best Seller's @ Amazon.com

Visit XML Training Material Guide Homepage

Technology helps engage students - how do classroom instruction and social dynamics change when the classroom is completely dependant on modern technology?

Dallas Web Design- local Dallas web design firm offers site design and backend system development