lost node at /usr/lib/perl5/XML/LibXML.pm line 1205.

"Jonas Häggqvist" <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
I'm getting a strange error when doing getElementsByTagName() on a
Document. Admittedly it could be related to my sub-par Perl-fu, but it
seems like I should at least not get a segfault it things were working
correctly.

The minimal example below shows this behaviour.

$ cat temp.pl
#!/usr/bin/perl

use XML::LibXML;

sub readfile {
    my ($file) = @_;
    $doc = XML::LibXML->new->parse_file($file);
    return \($doc);
}

my ($doc) = readfile($ARGV[0]);
bless($doc, 'XML::LibXML::Document');
my $elements = $doc->getElementsByTagName("bar");

$ cat temp.xml
<?xml version='1.0' encoding='UTF-8'?>
<foo>
    <bar>test</bar>
</foo>

$ perl temp.pl temp.xml
lost node at /usr/lib/perl5/XML/LibXML.pm line 1205.
Segmentation fault

-- 
Jonas Häggqvist
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.