Udostępnij za pośrednictwem


IEntityResolver2 Interface

Definition

Extended interface for mapping external entity references to input sources, or providing a missing external subset.

[Android.Runtime.Register("org/xml/sax/ext/EntityResolver2", "", "Org.Xml.Sax.Ext.IEntityResolver2Invoker")]
public interface IEntityResolver2 : IDisposable, Java.Interop.IJavaPeerable, Org.Xml.Sax.IEntityResolver
[<Android.Runtime.Register("org/xml/sax/ext/EntityResolver2", "", "Org.Xml.Sax.Ext.IEntityResolver2Invoker")>]
type IEntityResolver2 = interface
    interface IEntityResolver
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

Extended interface for mapping external entity references to input sources, or providing a missing external subset. The XMLReader#setEntityResolver XMLReader.setEntityResolver() method is used to provide implementations of this interface to parsers. When a parser uses the methods in this interface, the EntityResolver2#resolveEntity EntityResolver2.resolveEntity() method (in this interface) is used <em>instead of</em> the older (SAX 1.0) EntityResolver#resolveEntity EntityResolver.resolveEntity() method.

<blockquote> <em>This module, both source code and documentation, is in the Public Domain, and comes with <strong>NO WARRANTY</strong>.</em> </blockquote>

If a SAX application requires the customized handling which this interface defines for external entities, it must ensure that it uses an XMLReader with the <em>http://xml.org/sax/features/use-entity-resolver2</em> feature flag set to <em>true</em> (which is its default value when the feature is recognized). If that flag is unrecognized, or its value is false, or the resolver does not implement this interface, then only the EntityResolver method will be used.

That supports three categories of application that modify entity resolution. <em>Old Style</em> applications won't know about this interface; they will provide an EntityResolver. <em>Transitional Mode</em> provide an EntityResolver2 and automatically get the benefit of its methods in any systems (parsers or other tools) supporting it, due to polymorphism. Both <em>Old Style</em> and <em>Transitional Mode</em> applications will work with any SAX2 parser. <em>New style</em> applications will fail to run except on SAX2 parsers that support this particular feature. They will insist that feature flag have a value of "true", and the EntityResolver2 implementation they provide might throw an exception if the original SAX 1.0 style entity resolution method is invoked.

Added in SAX 2.0 (extensions 1.1 alpha).

Java documentation for org.xml.sax.ext.EntityResolver2.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Properties

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)

Methods

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
GetExternalSubset(String, String)

Allows applications to provide an external subset for documents that don't explicitly define one.

ResolveEntity(String, String, String, String)

Allows applications to map references to external entities into input sources, or tell the parser it should use conventional URI resolution.

ResolveEntity(String, String)

Allow the application to resolve external entities.

(Inherited from IEntityResolver)
SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to