Learning XML::LibXML::XPathContext

Nene

Usenet Archive
Joined
Apr 19, 2007
Messages
52
Reaction score
0
Hi,
I'm learning this module today and I'm getting 'invalid expression' every time I run it. The error seems to be related to my syntax/code rather than the contents of the test.xml file. Any help would be greatly appreciated, thank you in advance.

#!/usr/local/bin/perl
use warnings;
use Data::Dumper;
use XML::LibXML;

my $parser = XML::LibXML->new;
my $xc = $parser->parse_file("test.xml");

my $xpc = XML::LibXML::XPathContext->new($xc);

my @x = $xpc->find('/Something//Child::*');
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,245
Members
248,133
Latest member
DujonT

Latest Threads

Top