Friday, April 2, 2010

How can I convert CSV to XML?

I have a spreadsheet with a bunch of records that I want to import into a flash file that uses xml for it's data source. So 2 questions..

1. How do I convert it?

2. How can I preserve the existing xml tags and make sure the information is going into the proper tags?

Thanks

How can I convert CSV to XML?

Chances are you won't be relying on Flash to convert from one format to the other.?You should try Googling ''Convert Excel to XML'' or ''Convert Spreadsheet to XML'' and see what you find.?Here's one result:

http://www.ibm.com/developerworks/library/x-tipexc.html

How can I convert CSV to XML?

I saw several articles on the subject (including that one) but they're not much help. I need to be able to declare my own xml tags rather than having a potpurri of various generated ones. I created a mysql database and then exported it as xml which produced cleaner tags than what excel does when saving as xml which is as messy as saving a Word doc as html, but still no control on the tags. I was hoping someone out there was aware of some kind of utility that allows full control. But probably not..

You`ll probably want to use MS Access.

First: import the csv via the command external data/import, point to your csv and then declare your attributes.

When you got your table right, name the column headers after the tags you want to use in your xml file. Then export to xml, output is exactly how you would expect it. You can get a trial of Access here (Office Professional): http://us1.trymicrosoftoffice.com/default.aspx

  • eye shadow
  • No comments:

    Post a Comment