
July 29th, 2004, 04:04 AM
|
|
Registered User
|
|
Join Date: Jul 2004
Location: France
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Problems parsing XML with Expat ("Parse position is outside of buffer")
Hi!
I'm having the error "Parse position is outside of buffer" while trying to parse a simple XML document.
I'm using Perl and XML::XPath.
Code:
my $xml = <<_END;
<root_node>
<subnode>
test
</subnode>
</rootnode>
_END
my $xp=XML::XPath->new(xml=>$xml);
my $nodeset=$xp->find('//subnode'');
When I use a file instead of "xml" (ie my $xp=XML::XPath->new(filename=>'text.xml'), everything is ok.
What do I need to do ?
Cécilia.
|