import java.io.File;
import java.io.IOException;
import java.util.Iterator;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
public class Main {
public static void main(String[] args) {
String html = ""
+"
"+""
+"Director:"
+"test"+"";
Document doc = Jsoup.parse(html);
System.out.println(doc.toString());
Elements spanWithId = doc.select("span#my");
if (spanWithId != null) {
System.out.printf("Found %d Elements\n", spanWithId.size());
if (!spanWithId.isEmpty()) {
Iterator it = spanWithId.iterator();
Element element = null;
while (it.hasNext()) {
element = it.next();
System.out.println(element.toString());
}
}
}
}
}