I've created a program to scrape data from a website using the <tr> tag. When I run my program and print my array List<String> getDataList I get a single string row of data as a printout.
[Flights on time 93%, Within 1 hour 99%, FLIGHT FROM TO DEPART ARRIVE STATUS, FR 9083 Bournemouth Alicante 10:10 13:35 Landed 19:00, FR 1902 Krakow Dublin 10:45 12:55 Estimated Arrival 23:05,
So basically, I want to format the data into a useable format and make it readable. As you can see each comma separates one flight from another, but I need to separate themselves and add text inbetween, like the following. (I use code for the text i want to add manually)
FR 9083 From: Bournemouth To: Alicante Dep:10:10 Arr:13:35 Status Landed 19:00
and so on.......
How do i go about separating the data in order to add text elements in the middle.
I've thought of using the spaces to do it, but some destinations like 'London Stanstead' have spaces in the names as well as just the separators.
Can someone tell me how I would go about doing this please? I'm learning as i go here......\
Many Thanks
Map<String, String>instead ofList<String>.