I am making a program in java where i am getting from html data from css class .report
@RequestMapping(value = "/medindiaparser", method = RequestMethod.POST)
public ModelMap medindiaparser(@RequestParam String urlofpage ) throws ClassNotFoundException, IOException {
System.out.println("saveMedicineName");
ModelMap mv = new ModelMap(urlofpage);
System.out.println();
String url = urlofpage;
Document document = Jsoup.connect(url).get();
String TITLE = document.select(".report").text();
String[] news = TITLE.split(":");
System.out.println("Question: " + TITLE);
return mv;
}
Now what TITLE
is giving me.
name : aman kumar working in : home,outside what he does: program | sleep | eat
So what i want to get the specific value in an array like.
array[0] : aman kumar
array[1] : home,outside
array[2] : program | sleep | eat
So that, i can set the value of array in my models, anyone did it?
.report
consist <h3>
where header is located. it goes like this
<report><h3>Name</h3>aman kumar<h3>working in </h3>home, outside .....</report>
where header is located . it goes like this @Pshemo
– Aman Apr 21 '17 at 10:10Name
aman kumarworking in
home, outside .....