Parent Directory | Revision Log
moved tests in own directory, added test to demonstrate XML::Simple feature to remove spaces from begin and end attribute value (which is wrong for delimiters as WebPAC uses them)
1 | dpavlin | 278 | #!/usr/bin/perl -w |
2 | |||
3 | use strict; | ||
4 | use XML::Simple; | ||
5 | use IO::File; | ||
6 | use Data::Dumper; | ||
7 | |||
8 | my $xml = '<?xml version="1.0" encoding="ISO-8859-2"?><xml foo="a" foo_a=" a" foo_a_=" a " fooa_="a ">truæ</xml>'; | ||
9 | |||
10 | my $xml_file = shift @ARGV; | ||
11 | |||
12 | if ($xml_file) { | ||
13 | my $fh = new IO::File($xml_file) || die "can't open $xml_file: $!"; | ||
14 | $xml = XMLin($fh); | ||
15 | } else { | ||
16 | $xml = XMLin($xml); | ||
17 | } | ||
18 | |||
19 | print Dumper($xml),"\n"; | ||
20 |
Name | Value |
---|---|
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.26 |