Here you can find the source of getTextFromAClass(Element doc, String location)
public static String getTextFromAClass(Element doc, String location)
//package com.java2s; //License from project: Open Source License import org.jsoup.nodes.Element; public class Main { public static String getTextFromAClass(Element doc, String location) { Element elementByItemprop = doc.select("a[class=" + location + "]").first(); String result = (elementByItemprop != null) ? elementByItemprop.text() : "none"; return result; }//from w w w .j a v a2 s . c om }