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
In reply to Re: Parse XML into CSV Files
by dHarry
in thread Parse XML into CSV Files
by dmsparts
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |