Class HtmlNode

All Implemented Interfaces:
Selectable
Direct Known Subclasses:
Html

public class HtmlNode extends AbstractSelectable
Author:
code4crafer@gmail.com
  • Constructor Details

    • HtmlNode

      public HtmlNode(List<org.jsoup.nodes.Element> elements)
    • HtmlNode

      public HtmlNode()
  • Method Details

    • getElements

      protected List<org.jsoup.nodes.Element> getElements()
    • smartContent

      public Selectable smartContent()
    • links

      public Selectable links()
      Description copied from interface: Selectable
      select all links
      Returns:
      all links
    • xpath

      public Selectable xpath(String xpath)
      Description copied from interface: Selectable
      select list with xpath
      Parameters:
      xpath - xpath
      Returns:
      new Selectable after extract
    • selectList

      public Selectable selectList(Selector selector)
      Description copied from interface: Selectable
      extract by custom selector
      Specified by:
      selectList in interface Selectable
      Overrides:
      selectList in class AbstractSelectable
      Parameters:
      selector - selector
      Returns:
      result
    • select

      public Selectable select(Selector selector)
      Description copied from interface: Selectable
      extract by custom selector
      Specified by:
      select in interface Selectable
      Overrides:
      select in class AbstractSelectable
      Parameters:
      selector - selector
      Returns:
      result
    • selectElements

      protected Selectable selectElements(BaseElementSelector elementSelector)
      select elements
      Parameters:
      elementSelector - elementSelector
      Returns:
      result
    • $

      public Selectable $(String selector)
      Description copied from interface: Selectable
      select list with css selector
      Parameters:
      selector - css selector expression
      Returns:
      new Selectable after extract
    • $

      public Selectable $(String selector, String attrName)
      Description copied from interface: Selectable
      select list with css selector
      Parameters:
      selector - css selector expression
      attrName - attribute name of css selector
      Returns:
      new Selectable after extract
    • nodes

      public List<Selectable> nodes()
      Description copied from interface: Selectable
      get all nodes
      Returns:
      result
    • getSourceTexts

      protected List<String> getSourceTexts()
      Specified by:
      getSourceTexts in class AbstractSelectable