Error when using XML::Simple with XML::LibXML

Discussion in 'Perl Misc' started by Leif Wessman, Jun 18, 2004.

  1. Leif Wessman

    Leif Wessman Guest

    I've successfully installed XML::Simple and XML::LibXML.

    the following code gives me an error:
    ----
    #!/usr/local/bin/perl

    ....

    use XML::Simple;
    $XML::Simple::pREFERRED_PARSER = 'XML::LibXML';
    my $xs1 = XML::Simple->new();
    my $doc = $xs1->XMLin($input, forcearray=>1);
    ----

    The error is:

    Can't locate object method "xml_decl" via package "XML::Simple" at
    /home/leif/perl/lib/perl5/site_perl/5.8.0/i386-linux/XML/LibXML.pm
    line 369.
    at /home/leif/perl/lib/perl5/site_perl/5.8.0/XML/Simple.pm line 295

    What have I done wrong?

    Leif
     
    Leif Wessman, Jun 18, 2004
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian Gregory
    Replies:
    1
    Views:
    647
  2. Iain
    Replies:
    2
    Views:
    819
  3. Olav
    Replies:
    3
    Views:
    4,863
  4. kellner
    Replies:
    0
    Views:
    990
    kellner
    Jul 23, 2006
  5. Iain
    Replies:
    1
    Views:
    280
    Martin Honnen
    Dec 15, 2003
  6. Jahagirdar Vijayvithal S

    My experience with XML::DOM VS XML::LibXML

    Jahagirdar Vijayvithal S, Dec 1, 2005, in forum: Perl Misc
    Replies:
    21
    Views:
    521
    Tintin
    Dec 26, 2005
  7. Replies:
    5
    Views:
    1,715
    Brian McCauley
    Nov 29, 2006
  8. Peter Makholm
    Replies:
    2
    Views:
    372
    Permostat
    Mar 12, 2010
Loading...