Here you can find the source of getTextFromNodeSelect(Element doc, String location, String locationValue)
public static String getTextFromNodeSelect(Element doc, String location, String locationValue)
//package com.java2s; //License from project: Open Source License import org.jsoup.nodes.Element; public class Main { public static String getTextFromNodeSelect(Element doc, String location, String locationValue) { String[] locations = location.split(","); Element element = doc.select(locations[0] + "[" + locations[1] + "=" + locationValue + "]").first(); String result = (element != null) ? element.text() : "none"; return result.trim(); }/* w w w .j ava2 s . com*/ }