• 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

    • It has the same switch to allow whitelisting or not as the regular AdBlock extension.
    • These 20 crypto phishing applications are scamming Play Store users by Hamid Ganji Google Play Store is the main venue for Android users to download applications. While Google has strict rules and policies for verifying apps, some malicious apps somehow slip through anyway. Meanwhile, when it comes to crypto wallet apps, both Google app auditors and Play Store users need to be even more cautious. Cyble Research and Intelligence Labs has identified at least 20 crypto phishing applications on the Google Play Store that impersonate legitimate and popular crypto wallet apps and try to steal users' crypto credentials. By impersonation, these malicious apps trick users into downloading them and then start to capture the user's actual login data. "What makes this campaign particularly dangerous is the use of seemingly legitimate applications, hosted under previously benign or compromised developer accounts, combined with a large-scale phishing infrastructure linked to over 50 domains. This extends the campaign's reach and lowers the likelihood of immediate detection by traditional defenses." Cyble writes. Some of these malicious apps have the same name but come with a different package name. After removing duplicate names, here's the list of 9 newly discovered crypto phishing applications on the Play Store: Pancake Swap Suite Wallet Hyperliquid Raydium BullX Crypto OpenOcean Exchange Meteora Exchange SushiSwap Harvest Finance Blog According to Cyble, these apps prompt users to enter their 12-word mnemonic phrase to access the fake crypto wallet. Also, scammers use accounts that were previously used to distribute legitimate apps to minimize the risk of getting caught by Google. These accounts are more likely to be compromised and then taken over by scammers. If you've downloaded any of these fake crypto wallet apps from the Play Store, make sure to delete them as soon as possible. In 2024, revenue from crypto scams was estimated to be around $9.9 billion. This billion-dollar crypto scam business is expected to grow massively in 2025 thanks to AI.
    • Again...just because Microsoft never managed to be as successful as Google in that business that doesn't mean they are not exactly what Google is. An online advertising company. Edge's built in ad block in case you don't know whitelists their own advertising platform. According to Microsoft... Google ads and tracking bad, Microsoft ads and tracking good:)
  • Recent Achievements

    • Reacting Well
      viraltui earned a badge
      Reacting Well
    • Week One Done
      LunaFerret earned a badge
      Week One Done
    • Week One Done
      Ricky Chan earned a badge
      Week One Done
    • Week One Done
      maimutza earned a badge
      Week One Done
    • Week One Done
      abortretryfail earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      483
    2. 2
      +FloatingFatMan
      264
    3. 3
      snowy owl
      239
    4. 4
      ATLien_0
      229
    5. 5
      Edouard
      179
  • Tell a friend

    Love Neowin? Tell a friend!