Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: XML parsing with XML::Rules

by jakeease (Friar)
on Jun 18, 2013 at 07:17 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1039523]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 13:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found