Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Entity error in XML::XPATH

by cognizant (Pilgrim)
on Mar 03, 2006 at 11:19 UTC ( [id://534193] : perlquestion . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $str = $ARGV[0];
    my $xp = XML::XPath->new(xml => "$str");
    ...
    foreach my $node ($nodeset->get_nodelist) 
    {my $tag=XML::XPath::XMLParser::as_string($node);
    print "$tag\n";}
    
  2. or download this
    <xml>
    <h1><title>TH&Eacute;MATIC INTRODUCTION</title>
    ...
    <h2><title>Sub level title</title>
    <p>Para Text</p></h2>
    </h1></xml>
    
  3. or download this
    undefined entity at line 2, column 13, byte 19:
    <xml>
    <h1><title>TH&Eacute;MATIC INTRODUCTION</title>
    ...
    <p>Para goes here</p>
    <h2><title>Sub level title</title>
     at c:/Perl/site/lib/XML/Parser.pm line 187
    
  4. or download this
    use XML::Parser;
    use XML::Parser::Expat;
    use XML::Twig;
    ...
       my $tag=XML::XPath::XMLParser::as_string($node);
    print "$tag\n";
    }