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
Hi grandfather,
This is the code which i tried.
output.xmlrequire HTML::TokeParser; $p = HTML::TokeParser->new("output.xml") || die "Can't open: $!"; $p->empty_element_tags(1); open(FH, "output.xml"); print FH $p; close FH;
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!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: read a file and insert closing tags if not present
by GrandFather (Saint) on Mar 29, 2007 at 08:00 UTC | |
by valavanp (Curate) on Mar 29, 2007 at 09:45 UTC | |
Re^3: read a file and insert closing tags if not present
by f00li5h (Chaplain) on Mar 29, 2007 at 07:46 UTC |
In Section
Seekers of Perl Wisdom