Class NodeInternals

java.lang.Object
org.jsoup.nodes.NodeInternals

public final class NodeInternals extends Object
Internal hooks used by the parser and cleaner to attach source ranges to nodes and attributes.

This class is public only because jsoup's internal packages need to cross package boundaries; it is not a supported user API.

  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    attributeRange(Attributes attributes, String key, org.jsoup.internal.LineMap lineMap, int nameStart, int nameEnd, int valueStart, int valueEnd)
    Sets parser-tracked source offsets for an attribute.
    static void
    attributeRange(Attributes attributes, String key, Range.AttributeRange range)
    Copies an existing tracked attribute range onto another attribute set.
    static void
    endSourceRange(Element element, org.jsoup.internal.LineMap lineMap, int startPos, int endPos)
    Sets the source range for an element's end tag.
    static void
    sourceRange(Node node, org.jsoup.internal.LineMap lineMap, int startPos, int endPos)
    Sets the source range for a node's start.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • sourceRange

      public static void sourceRange(Node node, org.jsoup.internal.LineMap lineMap, int startPos, int endPos)
      Sets the source range for a node's start.
    • endSourceRange

      public static void endSourceRange(Element element, org.jsoup.internal.LineMap lineMap, int startPos, int endPos)
      Sets the source range for an element's end tag.
    • attributeRange

      public static void attributeRange(Attributes attributes, String key, org.jsoup.internal.LineMap lineMap, int nameStart, int nameEnd, int valueStart, int valueEnd)
      Sets parser-tracked source offsets for an attribute.
    • attributeRange

      public static void attributeRange(Attributes attributes, String key, Range.AttributeRange range)
      Copies an existing tracked attribute range onto another attribute set.