Share via


IXmlPullParser.DefineEntityReplacementText(String, String) Method

Definition

Set new value for entity replacement text as defined in XML 1.0 Section 4.5 Construction of Internal Entity Replacement Text.

[Android.Runtime.Register("defineEntityReplacementText", "(Ljava/lang/String;Ljava/lang/String;)V", "GetDefineEntityReplacementText_Ljava_lang_String_Ljava_lang_String_Handler:Org.XmlPull.V1.IXmlPullParserInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void DefineEntityReplacementText (string? entityName, string? replacementText);
[<Android.Runtime.Register("defineEntityReplacementText", "(Ljava/lang/String;Ljava/lang/String;)V", "GetDefineEntityReplacementText_Ljava_lang_String_Ljava_lang_String_Handler:Org.XmlPull.V1.IXmlPullParserInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member DefineEntityReplacementText : string * string -> unit

Parameters

entityName
String
replacementText
String
Attributes

Exceptions

Remarks

Set new value for entity replacement text as defined in XML 1.0 Section 4.5 Construction of Internal Entity Replacement Text. If FEATURE_PROCESS_DOCDECL or FEATURE_VALIDATION are set, calling this function will result in an exception -- when processing of DOCDECL is enabled, there is no need to the entity replacement text manually.

The motivation for this function is to allow very small implementations of XMLPULL that will work in J2ME environments. Though these implementations may not be able to process the document type declaration, they still can work with known DTDs by using this function.

<b>Please notes:</b> The given value is used literally as replacement text and it corresponds to declaring entity in DTD that has all special characters escaped: left angle bracket is replaced with &amp;lt;, ampersand with &amp;amp; and so on.

<b>Note:</b> The given value is the literal replacement text and must not contain any other entity reference (if it contains any entity reference there will be no further replacement).

<b>Note:</b> The list of pre-defined entity names will always contain standard XML entities such as amp (&amp;amp;), lt (&amp;lt;), gt (&amp;gt;), quot (&amp;quot;), and apos (&amp;apos;). Those cannot be redefined by this method!

Java documentation for org.xmlpull.v1.XmlPullParser.defineEntityReplacementText(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

See also