Here you can find the source of childrenByTag(final Element element, final String tag)
public static final Iterable<Element> childrenByTag(final Element element, final String tag)
//package com.java2s; import org.jsoup.nodes.Element; import com.google.common.base.Predicate; import com.google.common.collect.Iterables; public class Main { public static final Iterable<Element> childrenByTag(final Element element, final String tag) { return Iterables.filter(element.children(), new Predicate<Element>() { public final boolean apply(final Element _element) { return _element.tagName().equals(tag); }//from w w w .j av a2s . c o m }); } }