Class HtmlParseNode

java.lang.Object
com.renomad.minum.htmlparsing.HtmlParseNode

public final class HtmlParseNode extends Object
Represents the expected types of things we may encounter when parsing an HTML string, which for our purposes is ParseNodeType.

See W3.org Elements

  • Field Details

  • Constructor Details

  • Method Details

    • print

      public List<String> print()
      Return a list of strings of the text content of the tree.

      This method traverses the tree from this node downwards, adding the text content as it goes. Its main purpose is to quickly render all the strings out of an HTML document at once.

    • search

      public List<HtmlParseNode> search(TagName tagName, Map<String,String> attributes)
      Return a list of HtmlParseNode nodes in the HTML that match provided attributes.
    • getType

      public ParseNodeType getType()
    • getTagInfo

      public TagInfo getTagInfo()
    • getInnerContent

      public List<HtmlParseNode> getInnerContent()
    • getTextContent

      public String getTextContent()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • innerText

      public String innerText()