Text Extraction

Joined
Jan 11, 2008
Messages
2
Reaction score
0
Hi to all members.
I want to extract Text from a file. For example I have a file named index.html
LIKE

<html>
<head>
<script language="JavaScript" type="text/javascript">
function window_onload()
{

var numberForms = document.forms.length;
var formIndex;
for (formIndex = 0; formIndex < numberForms; formIndex++)
{
alert(document.forms[formIndex].name);
}
}
</script>
</head>
<body language=JavaScript type="text/javascript" onload="window_onload()">

<form name="form1">
<p>This is inside form1</p>
</form>
<form name="form2">
<p>This is inside form2</p>
</form>
<form name="form3">
<p>This is inside form3</p>
</form>
</body>
</html>


I want to parse this file in this way that in the output file no Javascript code be displyed. It will removes the javascript starting and ending tags and the javascript code in that tags will not be displayed. And this file will be looked like this

<html>
<head>
</head>
<body>
<form name="form1">
<p>This is inside form1</p>
</form>
<form name="form2">
<p>This is inside form2</p>
</form>
<form name="form3">
<p>This is inside form3</p>
</form>
</body>
</html>


plz help me out and sorry for my english.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top