Export to 1 file

Jun 5, 2016 at 1:16 PM
Hi,

This coversiom tool is simple and easy to use so thanks for the author.

But is the any way to export xml to csv as just one csv file, as at the moment there 2, "root" and "attachments".

Example XML:
<root>
  <root>
    <text>1</text>
    <bot_id>1</bot_id>
    <type>1</type>
    <subtype>1</subtype>
    <user>1</user>
    <ts>1</ts>
  </root>
  <root>
    <user>2</user>
    <type>2</type>
    <subtype>2</subtype>
    <text>2</text>
    <ts>2</ts>
  </root>
  <root>
    <text>3</text>
    <bot_id>3</bot_id>
    <mrkdwn>true</mrkdwn>
    <attachments>
      <fallback>3.1</fallback>
      <text>3.1</text>
      <id>3</id>
      <color>3.1</color>
    </attachments>
    <type>3</type>
    <subtype>3</subtype>
    <ts>3</ts>
  </root>
</root>
Thanks
Oct 19, 2016 at 5:18 AM
Hey, I've been using this converter extensively. It's important to realize that it is essentially a generic xml to csv converstion (although a very good one!), not all XML's will convert with it, since it's basically transforming from one data storage paradigm to another. The reason why you get two CSV files is because it is maintaining parent / child element relationships. This is CRITICAL if you plan to load the xml into a relational database, which is exactly what I do with my CSV files.