Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Entity error in XML::XPATH

by cognizant (Pilgrim)
on Mar 03, 2006 at 11:19 UTC ( #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";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://534193]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2023-01-28 09:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?