SAXParserFactory.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.
Sets the particular feature in the underlying implementation of org.
[Android.Runtime.Register("setFeature", "(Ljava/lang/String;Z)V", "GetSetFeature_Ljava_lang_String_ZHandler")]
public abstract 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
Parameters
- name
- String
The name of the feature to be set.
- value
- Boolean
The value of the feature to be set.
- Attributes
Exceptions
if a parser cannot be created which satisfies the requested configuration.
When the underlying XMLReader does not recognize the property name.
When the underlying XMLReader recognizes the property name but doesn't support the property.
If the name
parameter is null.
Remarks
Sets the particular feature in the underlying implementation of org.xml.sax.XMLReader. A list of the core features and properties can be found at http://www.saxproject.org/
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 org.xml.sax.ErrorHandler#fatalError(SAXParseException exception)
. See SAXParser
parse
methods for handler specification. </li> <li> When the feature is false
, the implementation will processing XML according to the XML specifications without regard to possible implementation limits. </li> </ul>
Java documentation for javax.xml.parsers.SAXParserFactory.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.
Applies to
See also
- <xref:Org.Xml.Sax.IXMLReader.SetFeature(System.String%2c+System.Boolean)>