Programming challenge: pull XML data with an HTTP GET, process and/or lightly transform it, and output a csv file. Please help me figure this out in Java or tell me what other language to use.
I'm trying to pull XML data down from a REST database, process it, and then spit out csv's. Using Java I've gotten as far as pulling the XML down from the server into a Document object, which I figured out how to print out as text. Now I need to process some of that data; simple transformations like taking a field from "AA-BBB-CCCC" into three separate fields "AA", "BBB", and "CCCC". Another task is changing all the underscores in a certain column into hyphens. After that I want to write the output to a csv file. If it would be easier to convert the XML to CSV and then process the CSV in Java, that's fine with me as well.
When I've been googling and stackoverflowing Java and XML, I find stuff like this
which seems super heavyweight and complicated.
Is there a simple way to do these kinds of transforms in Java, and write out to CSV? If MeFites could point me to any resources or tutorials on this, I would be very grateful.
Also, if Java is not the best place to be trying to do this, I am open to other languages (Python? Groovy?) as long as learning them will be fairly quick.
Other info that may be helpful: these are small files, less than 100 rows. I have a small about of experience with SQL and Java but am not a real programmer. I had to redownload Eclipse and google "how to add jar file" in order to get this far.