First of all thanks for the reply... I have read the xml file using sax parser and want to save the all the read elements/attributes & values and characters in csv format.. Suggestions will be a great help
Author and all-around good cowpoke
Joined: Mar 22, 2000
If you want all the contents with various bits separated by commas, just write to an output file from every startElement and characters method. In order to get the commas in the right place you will have to pay attention to the nesting of elements. On the other hand if you are trying to prepare data for interpretation in Excel, you need to think about what you want the resulting spreadsheet to look like. Bill
Check out apache web site for Xalan samples (http://xml.apache.org/xalan-j/index.html). This site has good samples showing how to convert XML into structured text format. You can change sample code to get your CSV format. Good luck Suresh
Joined: Jun 15, 2003
hi thanks for the solution.. It really helped me a lot.. can u please let me know if we want to do a backward engineering like in our case if we want to transform csv back to xml and xls back to xml then what can be done...? Once again thanks for the reply...