Remove Duplicate tags in a HTML/XML file

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi all,
        I am having a problem in truncating duplicate tags in a
site...For example,in the below code i want to keep only the <p></
p>.And the remaining tags(<p></p>) i want to remove.Please do a
help.....thank u.

 By using signals, you can set an alarm. This is another form of timer
that waits for a
specified number of seconds while allowing the rest of the Perl script
to continue. Once
the time has elapsed, the SIGALRM signal is sent to the Perl script,
and if a handler
has been configured, the specified function will execute. This is
often used in situations
where you want to provide a time-out for a particular task. For
example, here=92s a user
query with a default value=97if the user does not respond after 10
seconds, the script
continues with the default value:</p>
<p>The eval block is required so that the die statement that forms the
signal handler
drops out of the eval=97 setting the value of $@=97rather than terminating
the whole
script. You can then test that and decide how to proceed. Of course,
if the user provides
some input; then the alarm is reset to zero, disabling the alarm timer
and allowing you
to drop out of the eval block normally.</p>

Re: Remove Duplicate tags in a HTML/XML file

vivek ananth wrote:
Quoted text here. Click to load it

You need to parse the page, match up the tags and remove what you don't

Unless you have thousands of pages, you'll probably be better off just
using a text editor.

And BTW - removing these tags will change the formatting of the text.
Are you sure that's what you want?

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: Remove Duplicate tags in a HTML/XML file

Quoted text here. Click to load it


Site Timeline