• Is there any reason to compare XML to CSV?

    Write

    <root><![CDATA[

    ..contents of your CSV file..

    ]]></root>

    and you have XML file.

    Yes, need to escape "]]>".

    Yes, need to add some funcionality to your CSV parser to skip first and last rows.

    But yes, you can include all the family of CSV files, etc. This will need a little more logic from your parser.

    But someone wrote and test this, and name it XML.