Hi I am working on a program where in I have to separate all the <TR> of html file.
but the thing is that its not perfectly matching all <TR> instead taking in consideration all T....in file.
I mean the
string tokenizer delimeter which i m giving as <TR> is recognising T also .I want it to match only <TR>
heres the code plese help
import java.util.*;
class stest {
public static void main(String args[]) throws Exception {
BufferedReader fread=new BufferedReader(new FileReader("ab.txt")); do
{
String line=fread.readLine();
if(line!=null)
{
String delim1="<TR>";
StringTokenizer st = new StringTokenizer(line,"<TR>");
while (st.hasMoreTokens()) {
System.out.println(st.nextToken());
}
}
else
{
break;
}
}while(true);
}
}
----------------
tell me the solution of this