Experimental support for dBase .dbf files. Usege like this in all2xml.conf:
[webpac] / tests / test_xml_simple.pl
index 285b73e..7c04456 100755 (executable)
@@ -5,7 +5,16 @@ use XML::Simple;
 use IO::File;
 use Data::Dumper;
 
-my $xml = '<?xml version="1.0" encoding="ISO-8859-2"?><xml foo="a" foo_a=" a" foo_a_=" a " fooa_="a ">truæ</xml>';
+my $xml = '<?xml version="1.0" encoding="ISO-8859-2"?>
+<xml>
+<isis delimiter=" aa ">foo</isis>
+<isis>
+       <delimiter> aa </delimiter>
+       <format>foo</format>
+</isis>
+
+<test foo="a" foo_a=" a" foo_a_=" a " fooa_="a ">truæ</test>
+</xml>';
 
 my $xml_file = shift @ARGV;
 
@@ -13,7 +22,12 @@ if ($xml_file) {
        my $fh = new IO::File($xml_file) || die "can't open $xml_file: $!";
        $xml = XMLin($fh);
 } else {
-       $xml = XMLin($xml);
+       $xml = XMLin($xml,
+               ForceArray => [ 'isis', 'config', 'format' ],
+               ForceContent => 1,
+               NormaliseSpace => 0,
+               KeyAttr => [ 'isis' ]
+       );
 }
 
 print Dumper($xml),"\n";