Org.Xml.Sax.IXMLReader.GetFeature Method
Look up the value of a feature flag.

Syntax

[Android.Runtime.Register("getFeature", "(Ljava/lang/String;)Z", "GetGetFeature_Ljava_lang_String_Handler:Org.Xml.Sax.IXMLReaderInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool GetFeature (string name)

See Also

IXMLReader.SetFeature(string, System.Boolean)

Parameters

name
The feature name, which is a fully-qualified URI.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Org.Xml.Sax.SAXNotRecognizedExceptionIf the feature value can't be assigned or retrieved.
Org.Xml.Sax.SAXNotSupportedExceptionWhen the XMLReader recognizes the feature name but cannot determine its value at this time.

Remarks

Look up the value of a feature flag.

java Example

 XMLReader r = new MySAXDriver();

                         // try to activate validation
 try {
   r.setFeature("http://xml.org/sax/features/validation", true);
 } catch (SAXException e) {
   System.err.println("Cannot activate validation.");
 }

                         // register event handlers
 r.setContentHandler(new MyContentHandler());
 r.setErrorHandler(new MyErrorHandler());

                         // parse the first document
 try {
   r.parse("http://www.foo.com/mydoc.xml");
 } catch (IOException e) {
   System.err.println("I/O exception reading XML document");
 } catch (SAXException e) {
   System.err.println("XML exception reading document.");
 }
 

The feature name is any fully-qualified URI. It is possible for an XMLReader to recognize a feature name but temporarily be unable to return its value. Some feature values may be available only in specific contexts, such as before, during, or after a parse. Also, some feature values may not be programmatically accessible. (In the case of an adapter for SAX1 Org.Xml.Sax.IParser, there is no implementation-independent way to expose whether the underlying parser is performing validation, expanding external entities, and so forth.)

All XMLReaders are required to recognize the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes feature names.

Typical usage is something like this:

Implementors are free (and encouraged) to invent their own features, using names built on their own URIs.

[Android Documentation]

Requirements

Namespace: Org.Xml.Sax
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1