Java convert csv file to xml




















Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 11 years, 6 months ago. Active 4 years, 10 months ago. Viewed 36k times. Improve this question. Are the values value1, Is averages the only element that might appear?

Or do you need to be more flexible about what appears there? If no value node for a particular node is found, than you can put a value you wish null or empty or whatever convention you like - see my description in answer. It's not a problem that the nodes are nested since for CSV they will be red flat. Ionescu thank you for your response, I think I've gathered enough algorithms for solving this, I even have one implemented not working properly but right now I'm looking for some code hence the bounty.

Add a comment. Active Oldest Votes. The second pass, having established the number of target columns, will do the actual CSV output. LinkedHashMultimap; import java. FileNotFoundException; import java. FileReader; import java.

IOException; import java. LinkedHashMap; import java. Entry; import org. Attributes; import org. InputSource; import org. SAXException; import org. XMLReader; import org. DefaultHandler; import org. Improve this answer. Over 2 million developers have joined DZone.

Like 1. Join the DZone community and get the full member experience. Join For Free. To get things started, we will install our Maven package by adding a reference to the repository: Java. Download Free Trial. Conversion for Java. Download Learn Buy. About GroupDocs. System Requirements A basic conversion with GroupDocs. Conversion for Java from Maven.



0コメント

  • 1000 / 1000