Dermot Paikkos <[EMAIL PROTECTED]> asked:
> Thanx for the replies. At the moment I am testing the water
> so I am using Activestate 5.8. All I have done with
> XML::Simple is below.
>
> ============= xml-parse.pl =========
> #!/bin/perl
> use strict;
> use XML::Simple;
> use Data::Dumper;
>
> my $file = shift; # Doesn't like this.
> #my $file = "section-xml"; # or this.
> my $config = XMLin('c:\\windows\\desktop\\section-xml');
You can use forward slashes as directory separators, i.e.
my $config = XMLin('c:/windows/desktop/section-xml');
> I get the error:
> junk after document element at line 65, column 0, byte 1993
> at C:/Perl/site/lib/XML/Parser.pm line 185.
Your XML isn't well-formed. You are missing an outermost
tag that encompasses the whole document, i.e.
<document>
<record>
...
</record>
...
<record>
...
</record>
</document>
Add the tags and it'll work.
HTH,
Thomas
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>