• 0

CSV to XML Conversion


Question

I've been tasked with converting a CSV file to XML by a colleague, I do not have much experience in this field and I know I more than likely wont have all of the necessary information, but maybe you can help. The file, which I will upload, is a data dictionary  from a program called REDCap. This program is essentially excel on steroids, and is used as a data collection tool at the Hospital I work at. The data dictionary are basically the ID fields from the "database" that is built within the form (this is what captures data from a user). This is the type of data located in the CSV file, headers at the top. My colleague mentioned Altova and mapping the CSV to the XML, but surely looking at this dataset, it is not as complicated as I was originally told and I almost think one of these online converters will do just fine. I have found a few, but I am unsure if there is one that is better than the other? Are there certain standards to be followed when outputting to XML?

xmlcon.PNG

Link to comment
https://www.neowin.net/forum/topic/1377190-csv-to-xml-conversion/
Share on other sites

6 answers to this question

Recommended Posts

  • 0

There are many ways that could be structured as XML. If you've found an online converter that output's something REDCap is happy to absorb then don't worry about it.

 

The only thing I'll mention is that I hope you're not submitting private records to a random online conversion service.

  • 0
  On 02/12/2018 at 23:30, virtorio said:

There are many ways that could be structured as XML. If you've found an online converter that output's something REDCap is happy to absorb then don't worry about it.

 

The only thing I'll mention is that I hope you're not submitting private records to a random online conversion service.

Expand  

I appreciate the concern, my REDCap project has no current data, we are still in the stages of finalizing the form for the city. However, the city is who wants the XML file. How this came about is, my colleague was tasked with helping create a digital form, the city used to purchase software to do this but with REDCap being free for non-profits, he figured this would do the trick. The form was created with our own ID's, the city has specific IDs they wanted for other software they use, so we were tasked with recreating the form with the correct IDs, then converting the data dictionary to an XML for them to validate. I have a conference call Wed, to see if they need specific headers or anything, but wanted to be ahead of the game.

  • 0
  On 02/12/2018 at 23:32, Circaflex said:

I appreciate the concern, my REDCap project has no current data, we are still in the stages of finalizing the form for the city. However, the city is who wants the XML file.

Expand  

Oh yes, sorry I misread that. Anyway, that's the point of XML, is can be structured however you need it to be. Something like this:

<record record_id="xxx" record_id_8736_ce="xxx">
  <date_of_entry>xxx</date_of_entry>
  <country_id>xxx</country_id>
  ...
</record>
<record record_id="xxx" record_id_8736_ce="xxx">
  <date_of_entry>xxx</date_of_entry>
  <country_id>xxx</country_id>
  ...
</record>
<record record_id="xxx" record_id_8736_ce="xxx">
  <date_of_entry>xxx</date_of_entry>
  <country_id>xxx</country_id>
  ...
</record>

Often, you'd put the "unique identifier" of the record as an attribute, and the data in child nodes, like above.

  • 0
  On 02/12/2018 at 23:32, Circaflex said:

converting the data dictionary to an XML for them to validate

Expand  

"XML" and "Validate" in the same sentence might mean they are looking for an XML Schema file

 

https://en.wikipedia.org/wiki/XML_Schema_(W3C)

 

https://www.w3.org/standards/techs/xmlschema#w3c_all

 

XML is a giant toxic mess and people avoid it like the plague these days, but mostly they use JSON which IMO ends up suffering many of the same issues but at least is not as painful to look at...

 

https://en.wikipedia.org/wiki/JSON

 

https://www.json.org/xml.html

 

 

 

 

 

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Could we have a desktop version of this lightweight bloat free Windows 11?
    • So they admit that Windows 11 is slow and bloated. Good to know!
    • Real handheld Xbox hardware was canceled, this is just a PC with a screen and controller built-in.
    • Amazon Deal: JBL BAR 1000 7.1.4, BAR 700 5.1 Dolby Atmos wireless subwoofer soundbars by Sayan Sen If you are in the market for an audio system and are after smaller bookshelf speakers delivering highly accurate sound, then take a look at KEF and Polk Audio's Q Concerto Meta and Reserve R200 speakers, respectively, as both of them are up for sale at their lowest ever prices. However, if you are more into shaking your house, which is not possible without a subwoofer, then Samsung has its Q900F, Q800F, and Q600F soundbar systems with wireless subwoofers at the lowest prices. These are the latest 2025 models, and you can take a look at them in this article here. JBL BAR 1000 For those looking for additional options, JBL's BAR 1000 and Bar 700 are also available. The former has hit its lowest ever price too, while the latter is back to its cheapest (purchase links down below). JBL claims that its BAR 1000 model goes as low as 33Hz which is crucial for movie-watching or even some genres of music. The 10-inch subwoofer is rated at 300 watts of RMS power. The total power output of the system is 880 watts at THD (total harmonic distortion) of 1%. JBL BAR 1000 rear view Unlike the 7.1.4 JBL BAR 1000, the BAR 700 is a 5.1 system which means it lacks true Dolby Atmos, but it should still provide an Atmos-like experience. DTS:X is also not supported. The BAR 700 is rated at 620 watts. It is good to see some power ratings, as companies like Samsung, Sonos, Bose, and more tend not to mention them all too often nowadays. Interestingly, both the BAR systems have similarly-specced subwoofers so if bass is what you are looking for and do not care about the Atmos experience so much, you can opt for the BAR 700 too. Get them at the links below: JBL Bar 1000: 7.1.4-Channel soundbar with Detachable Surround Speakers, MultiBeam™, True Dolby Atmos®, and DTS:X®, Black: $799.95 (Shipped and Sold by Amazon US) JBL Bar 700: 5.1-Channel soundbar with Detachable Surround Speakers and Dolby Atmos®, Black: $549.95 (Amazon US) + you also get free 90-day Amazon Music This Amazon deal is US-specific and not available in other regions unless specified. If you don't like it or want to look at more options, check out the Amazon US deals page here. Get Prime (SNAP), Prime Video, Audible Plus or Kindle / Music Unlimited. Free for 30 days. As an Amazon Associate, we earn from qualifying purchases.
    • Funny how just a few days ago we hear a lot of rumors that this device was cancelled.
  • Recent Achievements

    • Dedicated
      Epaminombas earned a badge
      Dedicated
    • Veteran
      Yonah went up a rank
      Veteran
    • First Post
      viraltui earned a badge
      First Post
    • Reacting Well
      viraltui earned a badge
      Reacting Well
    • Week One Done
      LunaFerret earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      478
    2. 2
      +FloatingFatMan
      264
    3. 3
      ATLien_0
      236
    4. 4
      snowy owl
      232
    5. 5
      Edouard
      176
  • Tell a friend

    Love Neowin? Tell a friend!