public class Range extends Object
Parser.setTrackPosition(boolean).Node.sourceRange()| Modifier and Type | Class and Description |
|---|---|
static class |
Range.Position
A Position object tracks the character position in the original input source where a Node starts or ends.
|
| Constructor and Description |
|---|
Range(Range.Position start,
Range.Position end)
Creates a new Range with start and end Positions.
|
| Modifier and Type | Method and Description |
|---|---|
Range.Position |
end()
Get the end position of this node.
|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isTracked()
Test if this source range was tracked during parsing.
|
Range.Position |
start()
Get the start position of this node.
|
String |
toString()
Gets a String presentation of this Range, in the format
line,column:pos-line,column:pos. |
void |
track(Node node,
boolean start)
Internal jsoup method, called by the TreeBuilder.
|
public Range(Range.Position start, Range.Position end)
start - the start positionend - the end positionpublic Range.Position start()
public Range.Position end()
public boolean isTracked()
-1).public void track(Node node, boolean start)
node - the node to associate this position tostart - if this is the starting range. false for Element end tags.Copyright © 2009–2022 Jonathan Hedley. All rights reserved.