XmlLineNumber Class

com.bea.xml
XmlLineNumber Class

public class XmlLineNumber

    extends XmlCursor.XmlBookmark

A subclass of XmlBookmark that holds line number information. If a document is parsed with line numbers enabled, these bookmarks will be placed at appropriate locations within the document.

Related Topics

XmlOptions.setLoadLineNumbers()


Hierarchy
Object
  XmlCursor.XmlBookmark
    XmlLineNumber

Field Summary

   
Fields from  com.bea.xml.XmlCursor.XmlBookmark
_currentMark, _ref
 

Constructor Summary

XmlLineNumber(int line, int column, int offset)

Constructs a line number and column with no file offset information.
XmlLineNumber(int line, int column)

Constructs a line number and column with no file offset information.
XmlLineNumber(int line)

Constructs a line number with no column or offset information.
 

Method Summary

public int
getColumn()
Returns the 1-based column number, or -1 if not known.
public int
getLine()
Returns the 1-based line number, or -1 if not known.
public int
getOffset()
Returns the 0-based file offset number, or -1 if not known.
 
Methods from  com.bea.xml.XmlCursor.XmlBookmark
createCursor, getKey, toBookmark
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   

Constructor Detail

XmlLineNumber

public XmlLineNumber(int line, 
                     int column, 
                     int offset)
Constructs a line number and column with no file offset information.

XmlLineNumber

public XmlLineNumber(int line, 
                     int column)
Constructs a line number and column with no file offset information.

XmlLineNumber

public XmlLineNumber(int line)
Constructs a line number with no column or offset information.
 

Method Detail

getColumn() Method

public int getColumn()
Returns the 1-based column number, or -1 if not known.


getLine() Method

public int getLine()
Returns the 1-based line number, or -1 if not known.


getOffset() Method

public int getOffset()
Returns the 0-based file offset number, or -1 if not known.