Package de.pdark.decentxml
Class Location
java.lang.Object
de.pdark.decentxml.Location
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis is just a marker that the node has been foundstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThis method is called when an information is requested from the locationprotected voidprotected voidThis method is called when the location information comes from an XML sourceintThe column.intgetLine()The line numberintOffset at which the current line starts in the documentintprotected voidmoveToOffset(XMLSource source, int offset) This moves the line and column information by the text found in the source.protected voidThis method is called when you specify a child node of an element but when the location is requested, this node cannot be found.toString()
-
Field Details
-
source
-
element
-
document
-
node
-
offset
private int offset -
line
private int line -
lineStartOffset
private int lineStartOffset -
column
private int column
-
-
Constructor Details
-
Location
-
Location
-
Location
-
Location
-
-
Method Details
-
getOffset
public int getOffset() -
getLine
public int getLine()The line number -
getColumn
public int getColumn()The column. Tab is 8 character wide -
getLineStartOffset
public int getLineStartOffset()Offset at which the current line starts in the document -
calcLocation
protected void calcLocation()This method is called when an information is requested from the location -
calcLocationFromSource
protected void calcLocationFromSource()This method is called when the location information comes from an XML source -
moveToOffset
This moves the line and column information by the text found in the source. -
calcLocationFromElement
protected void calcLocationFromElement() -
nodeNotFound
protected void nodeNotFound()This method is called when you specify a child node of an element but when the location is requested, this node cannot be found.By default, this method just resets the location but you can override it to throw an exception, if you like.
-
toString
-