Dela via


DefaultHandler2.ResolveEntity(String, String, String, String) Method

Definition

Tells the parser to resolve the systemId against the baseURI and read the entity text from that resulting absolute URI.

[Android.Runtime.Register("resolveEntity", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/xml/sax/InputSource;", "GetResolveEntity_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual Org.Xml.Sax.InputSource? ResolveEntity (string? name, string? publicId, string? baseURI, string? systemId);
[<Android.Runtime.Register("resolveEntity", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/xml/sax/InputSource;", "GetResolveEntity_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Handler")>]
override this.ResolveEntity : string * string * string * string -> Org.Xml.Sax.InputSource

Parameters

name
String

Identifies the external entity being resolved. Either "[dtd]" for the external subset, or a name starting with "%" to indicate a parameter entity, or else the name of a general entity. This is never null when invoked by a SAX2 parser.

publicId
String

The public identifier of the external entity being referenced (normalized as required by the XML specification), or null if none was supplied.

baseURI
String

The URI with respect to which relative systemIDs are interpreted. This is always an absolute URI, unless it is null (likely because the XMLReader was given an InputSource without one). This URI is defined by the XML specification to be the one associated with the "&lt;" starting the relevant declaration.

systemId
String

The system identifier of the external entity being referenced; either a relative or absolute URI. This is never null when invoked by a SAX2 parser; only declared entities, and any external subset, are resolved by such parsers.

Returns

An InputSource object describing the new input source.

Implements

Attributes

Exceptions

Any SAX exception, possibly wrapping another exception.

Probably indicating a failure to create a new InputStream or Reader, or an illegal URL.

Remarks

Tells the parser to resolve the systemId against the baseURI and read the entity text from that resulting absolute URI. Note that because the older DefaultHandler#resolveEntity DefaultHandler.resolveEntity(), method is overridden to call this one, this method may sometimes be invoked with null <em>name</em> and <em>baseURI</em>, and with the <em>systemId</em> already absolutized.

Java documentation for org.xml.sax.ext.DefaultHandler2.resolveEntity(java.lang.String, java.lang.String, java.lang.String, java.lang.String).

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.

Applies to