- 18 Hot IT Certifications for 2014
- CIOs Opting for IT Contractors Over Hiring Full-Time Staff
- 12 Best Free iOS 7 Holiday Shopping Apps
- For CMOs Big Data Can Lead to Big Profits
At first glance this looks like an easy problem to solve using XML Stylesheet Language Transformation (XSLT).
We match the document root with <xsl:template match="/"> and walk through the rows of CSV data records and columns of data fields printing the contents of each field followed by a comma, with line breaks between records as follows:
<xsl:for-each select="record"><xsl:for-each select="*"><xsl:apply-templates /></xsl:for-each></xsl:for-each><br /></xsl:template>.
For more examples using this kind of approach, search the Web for 'xml2csv.'
Converting XML to CSV can help you get started with XSLT. To convert large numbers of files or complex XML files, check out tools such as XMLSpy for their file Import/Export features.
One reasonably robust and free XML-to-CSV converter is in a utilities package named Poof! at www.kilowattsoftware.com. The program, a Windows command-line utility named xml2csv, reads XML files then lists the column fieldnames in the file or writes the CSV file, with or without column headers.
Read more about software in Network World's Software section.