IXmlPullParser.DefineEntityReplacementText(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 &lt;, ampersand with &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;), lt (&lt;), gt (&gt;), quot (&quot;), and apos (&apos;). Those cannot be redefined by this method!
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.