It's not a secret anymore!
The moose likes XML and Related Technologies and the fly likes generate xhtml  from csv file in java Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "generate xhtml  from csv file in java" Watch "generate xhtml  from csv file in java" New topic
Author

generate xhtml from csv file in java

Yakup Klein
Greenhorn

Joined: Mar 23, 2006
Posts: 9
What is the best and simple way to generate xhtml from an csv file in java at the server side? Isn't jsp the right tool for it or are there better options.?
Thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35223
    
    7
JSP would be the way to go if the XHTML is to be served to a browser. Any actual file I/O (and further processing, if there is any) should be done in a backing bean or a servlet, though, not in the JSP itself.


Android appsImageJ pluginsJava web charts
Yakup Klein
Greenhorn

Joined: Mar 23, 2006
Posts: 9
Thanks, that was fast.
It stays on the server side and will be delivered to a Content Delivery Platform.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
Moving off to servlets since has little to do with HTML/JavaScript other than the final outcome.

Eric
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12265
    
    1
If this was my problem I would get an example of the desired XHTML text and study it to find regular features which could turn into Java classes and methods. Since an XHTML page forms a DOM there will be a logical hierarchy.

Try to locate the point at which a line of CSV gets turned into XHTML - is this a line in a Table or what.

Is the final result entirely derived from the CSV or is their other content which must be included?

Bill

Java Resources at www.wbrogden.com
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56157
    
  13

It actually sounds like an exercise in XML more than anything else.

Convert the CSV to the appropriate in-memory XHTML DOM and then serialize.

As such, moving to the XML forum as this issue has no Servlets dimension.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: generate xhtml from csv file in java
 
Similar Threads
how to load a cvs file into a oracle 9i database using java
display output table in excel file format
generate zip file containing a csv file
Plotting a graph in Excel
CSV to Java