Java HTML Jsoup Element childrenByTag(final Element element, final String tag)

Here you can find the source of childrenByTag(final Element element, final String tag)

Description

children By Tag

License

Open Source License

Declaration

public static final Iterable<Element> childrenByTag(final Element element, final String tag) 

Method Source Code

//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
        });
    }
}

Related

  1. addProperty(Map ret, Element element)
  2. addStyle(Element element, String styleToBeAdded)
  3. addTag(Element e, String tagName)
  4. appendFragment(Element e, String fragment)
  5. appendText(Element element, StringBuffer stringBuffer)
  6. collectItemRewards(final Element icontab, final BiConsumer collector)
  7. collectTextUntilNextTag(final Element header, final String nextTagName)
  8. containsLink(Element element, String link)
  9. convertLinksToStrings(Elements links)