Americas

  • United States

Converting XML to a readable format

Opinion
Feb 02, 20042 mins
NetworkingProgramming Languages

* Dr. Internet columnist Steve Blass offers advice on converting XML to a readable format

In last week’s column (https://www.nwfusion.com/columnists/2004/0126internet.html) you discussed converting comma-delimited files to XML. What about converting XML to a readable format?

At first glance this looks like an easy problem to solve using XML Stylesheet Language Transformation (XSLT). We match the document root with . 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 http://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.

Blass is a network architect at Change@Work in Houston. He can be reached at dr.internet@changeatwork.com.