Javax.Xml.Validation.SchemaFactory.SetFeature Method
Set the value of a feature flag.

Syntax

[Android.Runtime.Register("setFeature", "(Ljava/lang/String;Z)V", "GetSetFeature_Ljava_lang_String_ZHandler")]
public virtual void SetFeature (string name, bool value)

See Also

SchemaFactory.GetFeature(string)

Parameters

name
The feature name, which is a non-null fully-qualified URI.
value
The requested value of the feature (true or false).

Exceptions

TypeReason
Org.Xml.Sax.SAXNotRecognizedExceptionIf the feature value can't be assigned or retrieved.
Org.Xml.Sax.SAXNotSupportedExceptionWhen the Javax.Xml.Validation.SchemaFactory recognizes the feature name but cannot set the requested value.
Java.Lang.NullPointerExceptionif the name parameter is null.

Remarks

Set the value of a feature flag.

  • 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 Org.Xml.Sax.IErrorHandler.FatalError(Org.Xml.Sax.SAXParseException). See SchemaFactory.ErrorHandler.
  • false: the implementation will processing XML according to the XML specifications without regard to possible implementation limits.

Feature can be used to control the way a Javax.Xml.Validation.SchemaFactory parses schemas, although Javax.Xml.Validation.SchemaFactorys are not required to recognize any specific feature names.

The feature name is any fully-qualified URI. It is possible for a Javax.Xml.Validation.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.FeatureSecureProcessing feature. When the feature is:

[Android Documentation]

Requirements

Namespace: Javax.Xml.Validation
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 8