SAXLocator
classin packageklyn.io.xml.sax
public class SAXLocator extends Object implements Locator2
└ SAXLocator
All Implemented Interfaces: Locator2

Mutable locator used by the pure Klyn SAX parser.

The reader updates this object before reporting document events. Applications can keep a reference to it, but the values are meaningful only during parser callbacks.

Example
import klyn.io.xml.sax

locator = SAXLocator()
locator.setPosition(4, 12)
print(locator.getLineNumber())
Inherited Properties
propertyInherited Properties from Object: type
Constructors
Modifier and Type Member Description
public SAXLocator Creates a locator without source identifiers.
Methods
Modifier and Type Member Description
public getColumnNumber
getColumnNumber() as Int
Returns the current one-based column number.
public getEncoding
getEncoding() as String
Returns the character encoding.
public getLineNumber
getLineNumber() as Int
Returns the current one-based line number.
public getPublicId
getPublicId() as String
Returns the public identifier.
public getSystemId
getSystemId() as String
Returns the system identifier.
public getXMLVersion
getXMLVersion() as String
Returns the XML version.
public setEncoding
setEncoding(encoding as String) as Void
Sets the character encoding reported by Locator2.
public setPosition
setPosition(lineNumber as Int, columnNumber as Int) as Void
Sets the current one-based line and column.
public setPublicId
setPublicId(publicId as String) as Void
Sets the public identifier.
public setSystemId
setSystemId(systemId as String) as Void
Sets the system identifier.
public setXMLVersion
setXMLVersion(xmlVersion as String) as Void
Sets the XML version reported by Locator2.
Inherited Methods
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml