Org.Xml.Sax.IContentHandler.SetDocumentLocator Method
Receive an object for locating the origin of SAX document events.

Syntax

[Android.Runtime.Register("setDocumentLocator", "(Lorg/xml/sax/Locator;)V", "GetSetDocumentLocator_Lorg_xml_sax_Locator_Handler:Org.Xml.Sax.IContentHandlerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetDocumentLocator (ILocator locator)

See Also

ILocator

Parameters

locator
an object that can return the location of any SAX document event

Remarks

Receive an object for locating the origin of SAX document events.

SAX parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the ContentHandler interface.

The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine.

Note that the locator will return correct information only during the invocation SAX event callbacks after IContentHandler.StartDocument returns and before IContentHandler.EndDocument is called. The application should not attempt to use it at any other time.

[Android Documentation]

Requirements

Namespace: Org.Xml.Sax
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1