Convert Prosper XML to CSV

Many, Many people have asked me if there was an easy way to get the Prosper XML files as CSV (comma separated values).  In response, I have build a utility that does just that.  I contributed the utility to the Prosper API Open Source Project on SourceForge.

With CSV files you can easily import the files into older versions of MS Access (with access 2007 you can import the xml directly) and various statistics packages (SASS, MatLab).  I tried to make the utility extremely easy to use.  In that spirit I have also built a single JAR file, which you can download  here: ProsperXMLtoCSV.jar.  By using the single JAR you do not need to worry about your class path and various other java idiosyncrasies. 

Please note that these CSV files are larger than can be opened in Excel.  If you do open with excel some rows will be missing.

There are 2 ways to run the jar; however, only one way provides you with feedback during the long process of parsing the XML files and producing the CSV files.  So I will only tell you how to run the jar with feedback.

With java 5 or better installed and in your path use the following command line from the directory containing the ProsperXMLtoCSV.jar file…

java -jar ProsperXMLtoCSV.jar ProsperXMLFileLocation CSVDestinationDirectory

  • Prosper XML File Location: this is either the relative or fully qualified path to the Prosper XML file you are trying to parse
  • CSV Destination Directory: optional (if left off the current directory will be used) this is either the relative or fully qualified path to the destination directory for the CSV files

When you run this file you are given an output similar to this (this output was for the private data file)…

C:\prosperapi\trunk\data>java -jar ProsperXMLtoCSV.jar ProsperDataPrivateExpor
xml .
Starting conversion of CreditProfiles
CreditProfiles rows converted: 10000
CreditProfiles rows converted: 20000
CreditProfiles rows converted: 30000
CreditProfiles rows converted: 40000
CreditProfiles rows converted: 50000
CreditProfiles rows converted: 60000
CreditProfiles rows converted: 70000
CreditProfiles rows converted: 80000
CreditProfiles rows converted: 90000
CreditProfiles rows converted: 100000
CreditProfiles rows converted: 110000
CreditProfiles rows converted: 120000
CreditProfiles rows converted: 130000
CreditProfiles rows converted: 140000
CreditProfiles rows converted: 150000
CreditProfiles rows converted: 160000
CreditProfiles rows converted: 170000
CreditProfiles rows converted: 180000
CreditProfiles rows converted: 190000
CreditProfiles rows converted: 200000
CreditProfiles rows converted: 210000
CreditProfiles rows converted: 220000
ProsperDataExport rows converted: 221166

Starting conversion of LoanPerformances
LoanPerformances rows converted: 10000
LoanPerformances rows converted: 20000
LoanPerformances rows converted: 30000
LoanPerformances rows converted: 40000
LoanPerformances rows converted: 50000
LoanPerformances rows converted: 60000
LoanPerformances rows converted: 70000
LoanPerformances rows converted: 80000
LoanPerformances rows converted: 90000
LoanPerformances rows converted: 100000
LoanPerformances rows converted: 110000
LoanPerformances rows converted: 120000
LoanPerformances rows converted: 130000
LoanPerformances rows converted: 140000
LoanPerformances rows converted: 150000
LoanPerformances rows converted: 160000
LoanPerformances rows converted: 170000
LoanPerformances rows converted: 180000
LoanPerformances rows converted: 190000
LoanPerformances rows converted: 200000
LoanPerformances rows converted: 210000
LoanPerformances rows converted: 220000
LoanPerformances rows converted: 230000
LoanPerformances rows converted: 240000
LoanPerformances rows converted: 250000
ProsperDataExport rows converted: 257224

If you like this utility consider supporting future open source development with a donation via paypal:

If you liked this article, vote for it on del.icio.us and stumbleupon.


Categories:

Prosper.com, Tools



Related Articles Related Stores
9 comments ↓
#1 Chrisfs on 02.23.08 at 9:30 am

Thanks for the contribution Kevin!

#2 Prosper Roundup — Prosper Days Edition on 02.24.08 at 8:09 am

[...] RateLadder built a tool to Convert Prosper XML to CSV [...]

#3 Abe on 04.10.08 at 4:24 pm

This is fantastic, thanks!

#4 RateLadder on 04.10.08 at 6:51 pm

I am glad you like it.

#5 Jeff on 05.19.08 at 7:02 pm

I clicked on the link above for the “single jar file” and it downloads a zip archive. There are no files in the archive called ProsperXMLtoCSV.jar

There is something called main.jar, but I get errors when I run that.

I don’t speak java, and I just want to get either CSV files, or this loaded into SQL Server without me having to write any java or VB. Please help.

#6 RateLadder on 05.19.08 at 9:11 pm

The jar file itself is runnable… Assuming you have java installed. Jar is just a special zip file. Meaning that a jar is a file in the zip format, but the a java enabled environment jars can be run. This particular jar is special in that I compiled everything needed to run it into a single file eliminating possible class path issues.

#7 Tony on 10.21.08 at 11:46 am

Like Jeff, I am also confused as to how to follow the instructions above. Can someone please assist?

You write:

“With java 5 or better installed…”
- I am running Java 6.7

“…and in your path…”
- I don’t know what is meant by this exactly

“…use the following command line from the directory containing the ProsperXMLtoCSV.jar file…”
- As Jeff notes above, there are no files in the zipped archive by that file name

“…java -jar ProsperXMLtoCSV.jar ProsperXMLFileLocation CSVDestinationDirectory”
- I’m not clear about where to enter this command

This would be an incredibly helpful utility if I can get it working. Thanks in advance for your assistance.

#8 RateLadder on 10.22.08 at 5:02 am

the link in the post to to a file name “ProsperXMLtoCSV.jar” that file is whole and does not need to be unzipped. It will run from a command line if everything is properly configured as stated in this post.

#9 Tony on 10.23.08 at 10:29 am

Ok, for those of you still having trouble, here are some additional instructions for how to run this conversion:

1. You must save the above ProsperXMLtoCSV.jar link to your computer as a *.jar file, NOT as a *.zip file. Right-click on the link and select “Save target as…” to accomplish this.

2. You must start with an open Command Prompt. From Windows, go to Start\Programs\Accessories and select Command Prompt. The user interface should look like MS DOS.

3. You must run the above Java command as indicated from the directory into which you have saved the *.jar file. It is helpful to save the *.jar file in the same directory as your Prosper *.xml file(s).

4. Within the Java command, “ProsperXMLFileLocation” is the actual name of your *.xml file that you want to convert. If you are running the command from the same directory that your file is located in, you can just type the name of the file with the *.xml extension included.

Hope this helps.

Leave a Comment

Email Updates