SchemaFactory.SetFeature(String, Boolean) 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 the value of a feature flag.
[Android.Runtime.Register("setFeature", "(Ljava/lang/String;Z)V", "GetSetFeature_Ljava_lang_String_ZHandler")]
public virtual void SetFeature (string? name, bool value);
[<Android.Runtime.Register("setFeature", "(Ljava/lang/String;Z)V", "GetSetFeature_Ljava_lang_String_ZHandler")>]
abstract member SetFeature : string * bool -> unit
override this.SetFeature : string * bool -> unit
Parameters
- name
- String
The feature name, which is a non-null fully-qualified URI.
- value
- Boolean
The requested value of the feature (true or false).
- Attributes
Exceptions
If the feature value can't be assigned or retrieved.
When the SchemaFactory recognizes the feature name but cannot set the requested value.
if the name parameter is null.
Remarks
Set the value of a feature flag.
Feature can be used to control the way a SchemaFactory
parses schemas, although SchemaFactory
s are not required to recognize any specific feature names.
The feature name is any fully-qualified URI. It is possible for a SchemaFactory
to expose a feature value but to be unable to change the current value.
All implementations are required to support the javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING
feature. When the feature is:
<ul> <li> true
: the implementation will limit XML processing to conform to implementation limits. Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources. If XML processing is limited for security reasons, it will be reported via a call to the registered ErrorHandler#fatalError(org.xml.sax.SAXParseException)
. See #setErrorHandler(ErrorHandler errorHandler)
. </li> <li> false
: the implementation will processing XML according to the XML specifications without regard to possible implementation limits. </li> </ul>
Java documentation for javax.xml.validation.SchemaFactory.setFeature(java.lang.String, boolean)
.
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.