This is the code which i tried.
in reply to Re: read a file and insert closing tags if not present
in thread read a file and insert closing tags if not present
$p = HTML::TokeParser->new("output.xml") ||
die "Can't open: $!";
print FH $p;
The above file is a sample file which i tried to insert the closing tag for the greeting. Actually i have a file which contains 500 lines of text with tagging. for. example in that file i have a tag named <to> but it's not closed. I have to insert the closing tag. This is an example. Thanks for your suggestion.
<greeting class="simple">Hello, world!