Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: XML parsing with XML::Rules

by jakeease (Friar)
on Jun 18, 2013 at 07:17 UTC ( #1039523=note: print w/replies, xml ) Need Help??


in reply to Re^2: XML parsing with XML::Rules
in thread XML parsing with XML::Rules

It had slipped my mind that the summary was CDATA as I didn't look back at the previous post. And you're right, it's the explanation for the junk message. If Perl is complaining about a poorly formed XML document, it's because we are trying to convince it that $summary is XML.

It isn't, of course, it's HTML. And that's what Jenda meant when he said

If you want to split that into pieces you have to pass that string to another HTML or XML parser.

I was about to suggest parsing $summary with LWP or HTML::Parser when I read poj's post. I like how he has simplified it and shown HTML::TreeBuilder handling $summary.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1039523]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2021-03-03 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (67 votes). Check out past polls.

    Notices?