Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: read a file and insert closing tags if not present

by valavanp (Curate)
on Mar 29, 2007 at 09:45 UTC ( #607189=note: print w/ replies, xml ) Need Help??


in reply to Re^3: read a file and insert closing tags if not present
in thread read a file and insert closing tags if not present

Hi grandfather, Your solution is fine. But when i give like this extra tags have been inserted. how can i avoid this.

use strict; use warnings; use HTML::TreeBuilder; my $sgml = <<SGML; <html> <greeting class="simple">Hello, world!<head>heading</head> </html> SGML my $root = HTML::TreeBuilder->new (); $root->ignore_unknown (0); $root->parse ($sgml); print $root->guts (0)->as_XML ();
Thanks for your suggestion


Comment on Re^4: read a file and insert closing tags if not present
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (13)
As of 2014-07-24 17:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (163 votes), past polls