I am extracting this data from url (http://www.gmdu.net/corp-902113.html).. Can any one help me to extract data with below format.. Guide me pls
<div class="content">
<div class="label">Company Name: </div>
Haycolour (Pvt) Ltd
<br/>
<div class="label">Business Owner: </div>
Hayleys (Group of Companies
<br/>
<div class="label">Employees: </div>
50
<br/>
<div class="label">Main markets: </div>
Asia and south Asia
<br/>
<div class="label">Business Type: </div>
Manufacturer and Importers
<br/>
<div class="label">Product/Service: </div>
<br/>
<div class="label">About Us: </div>
Hayley’s is one of
<a rel="tag" title="Sri Lanka Manufacturers" href="http://www.gmdu.net/tags-Sri-Lanka-p1.html">Sri Lanka</a>
’s largest multinational business conglomerates with a history spanning 135 years. Commencing commercial operations in 1878 as Chas. P. Hayley and Company incorporated as Hayley’s Limited 61 years ago. We drive a globally competitive business portfolio encompassing 12 defined sectors of enterprise cutting across manufacturing, Industrial solutions, agriculture and services etc. www.Hayleys.com
<br/>
Haycolour (Pvt) Ltd is one of the largest manufactures for
<a rel="tag" title="Pigment Emulsion Manufacturers" href="http://www.gmdu.net/tags-Pigment-Emulsion- p1.html">Pigment Emulsion</a>
in Textile printing Industry in Sri Lanka, Garment panel printing, Latex, Inks and water base paints. We supply to local Textile Printing industry and also export to Asian region, such as Bangladesh, Thailand, Malaysia, Philippines and Pakistan and are open to the rest of the world’s market. Haycolour (Pvt) Limited is a fully owned subsidiary of Hayley’s PLC, Sri Lankas premier blue chip conglomerate. www.haycolour.com , (Site under construction)
<br/>
<div class="vcard">
<div class="label">Category: </div>
<span class="category">
<a title="Chemicals Manufacturers" href="http://www.gmdu.net/list-5-p1.html">Chemicals</a>
-
<a title="Textile Chemicals Manufacturers" href="http://www.gmdu.net/list-5-273-p1.html">Textile Chemicals</a>
</span>
<br/>
<div class="label">Region: </div>
<span class="adr country-name">
<a title="Sri Lanka Manufacturers" href="http://www.gmdu.net/loca-35-p1.html">Sri Lanka</a>
</span>
<span class="fn org">Haycolour (Pvt) Ltd</span>
<br/>
<div class="label">Link Tool: </div>
<a title="Sri Lanka Chemicals Manufacturers" href="http://www.gmdu.net/join-5-join-35-p1.html">Sri Lanka Chemicals</a>
-
<a title="Sri Lanka Textile Chemicals Manufacturers" href="http://www.gmdu.net/join-5-273-join-35-p1.html">Sri Lanka Textile Chemicals</a>
<br/>
<div class="label">Tags: </div>
<span class="tags">
<a rel="tag" title="Hayleys Limited Manufacturers" href="http://www.gmdu.net/tags-Hayleys-Limited-p1.html">Hayleys Limited</a>
-
<a rel="tag" title="Sri Lanka Manufacturers" href="http://www.gmdu.net/tags-Sri-Lanka-p1.html">Sri Lanka</a>
-
<a rel="tag" title="P Hayley Manufacturers" href="http://www.gmdu.net/tags-P-Hayley-p1.html">P Hayley</a>
-
<a rel="tag" title="Pigment Emulsion Manufacturers" href="http://www.gmdu.net/tags-Pigment-Emulsion- p1.html">Pigment Emulsion</a>
</span>
<br/>
<div class="label">Contact Person: </div>
Farooq Abbas
<br/>
<div class="label">Zip Code: </div>
<span class="adr postal-code"/>
<br/>
<div class="label">Website: </div>
<span class="url">www.hayleys.com</span>
<br/>
<div class="label">Address: </div>
<span class="adr street-address">No.25,Foster Lane,Colombo 10,</span>
<br/>
<div class="label">Telephone: </div>
<span class="tel">0094779123026</span>
<br/>
<div class="label">Fax: </div>
<span class="fax">0094112689139</span>
<br/>
<div class="label">PDF: </div>
<a type="application/pdf" rel="alternate" title="Haycolour (Pvt) Ltd PDF" href="http://www.gmdu.net/corp-902113.pdf">Haycolour (Pvt) Ltd PDF</a>
<br/>
<div class="label">Google Map: </div>
<a title="Haycolour (Pvt) Ltd Map" href="http://www.gmdu.net/map-902113.html">Haycolour (Pvt) Ltd Map</a>
</div>
</div>
I need to retrive value as
Company Name:Haycolour (Pvt) Ltd
Business Owner:Hayleys (Group of Companies
Employees:50
Main markets:Asia and south Asia
Business Type:Manufacturer and Importers
Product/Service:
About Us:Hayley’s is one of Sri Lanka’s largest multinational business conglomerates with a history spanning 135 years. Commencing commercial operations in 1878 as Chas. P. Hayley and Company incorporated as Hayley’s Limited 61 years ago. We drive a globally competitive business portfolio encompassing 12 defined sectors of enterprise cutting across manufacturing, Industrial solutions, agriculture and services etc. www.Hayleys.com
Category:Chemicals - Textile Chemicals
Region:Sri Lanka Haycolour (Pvt) Ltd
Link Tool:Sri Lanka Chemicals - Sri Lanka Textile Chemicals
Tags:Hayleys Limited - Sri Lanka - P Hayley - Pigment Emulsion
Contact Person:Farooq Abbas
Zip Code:
Website:www.hayleys.com
Address:No.25,Foster Lane,Colombo 10,
Telephone:0094779123026
Fax:0094112689139
PDF:Haycolour (Pvt) Ltd PDF
Google Map:Haycolour (Pvt) Ltd Map
My Code:
public static void main(String[] args) throws IOException {
Document doc = Jsoup.parse(input);
Elements labels = doc.select("div.content div.label");
for (Element label : labels) {
System.out.println(String.format("%s:%s", label.text().trim(),
label.nextSibling().outerHtml()));
}
}
My output:
Company Name:Haycolour (Pvt) Ltd
Business Owner:Hayleys (Group of Companies
Employees:50
Main markets:Asia and south Asia
Business Type:Manufacturer and Importers
Product/Service:
About Us:Hayley’s is one of Sri Lanka’s
Website::<span class="url">www.hayleys.com</span> Address::<span class="adr street-address">No.25,Foster Lane,Colombo 10,</span> Telephone::<span class="tel">0094779123026</span>
Some span class added here..please guide me
See Question&Answers more detail:os