java - Get a part of data got using HTTPClient -


I am using HTTPClient to connect to the website.

  byte [] feedbackBody = method.getResponseBody (); System.out.println (new string);  

Now I just want to get a part of html. That is, I want the text that tags & lt; Td> & Lt; Font size = \ "2 \" & gt; and and

are displayed before. >

How should I use split function for the above problem?

I used

  string [] substr = new string (responseBody) .split ("& lt; td>  

But it gives the address.

I want to display the text.

How should I go about this problem?

For a simple case you can use regex to match and remove all tags You will leave with the data.

  \ & lt; [^ \ & Gt;] * \ & gt;  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -