in reply to Parse XML into CSV Files
I haven taken a look at the code and the XML document and tried to run it. I see many points for improvements, so many that I don't quite know where to start;)
at the top of the file. This can help you catch common mistakes, unsafe programming constructs etc.use strict; use warnings;
There are variables in your program which are never used.my $xml = "e:\cars\input.xml";
open (FILENAME,">", $add3); or die "Can't open $add3 $!";
While your approach should work I am going to suggest a different approach all together. XML to CSV sounds like a standard application of XSLT to me. See Sal Mangano's XSLT Cookbook, it has a recipe for transforming XML into delimited data. There are modules on CPAN to do XSLT processing.
HTH
Harry
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Parse XML into CSV Files
by dmsparts (Sexton) on Jul 21, 2009 at 14:52 UTC | |
by dHarry (Abbot) on Jul 21, 2009 at 15:57 UTC |