Sets the value of a feature.
Allows an application to control the behavior of a reader by setting the state of the supported features. The feature name is any qualified Uniform Resource Identifier (URI). The ISAXXMLReader interface recognizes the following features:
"exhaustive-errors""http://xml.org/sax/features/external-general-entitities""http://xml.org/sax/features/external-parameter-entities""http://xml.org/sax/features/lexical-handler/parameter-entities""http://xml.org/sax/features/namespaces""http://xml.org/sax/features/namespace-prefixes""preserve-system-identifiers""schema-validation""server-http-request"The values for the namespaces and namespace-prefixes features may be available only in a specific context, such as before, during, or after a parse.
oSAXXMLReader.putFeature(strName, vfValue)
The following table shows the return values for the putFeature method.
| Feature | Returns |
|---|---|
exhaustive-errorsexternal-general-entitiesexternal-parameter-entitiesnamespacesnamespace-prefixesparameter-entitiespreserve-system-identifiersschema-validationserver-http-request |
If failed, trappable error. |
| Other features | Trappable error |
HRESULT putFeature( [in] const wchar_t * pwchName, [in] VARIANT_BOOL vfValue);
The following table lists the return values for the putFeature method.
| Feature | Returns |
|---|---|
namespaces |
S_OK (not parsing and legal)
E_FAIL if |
namespace-prefixes |
S_OK (not parsing and legal)
E_FAIL if |
external-general-entitiesexternal-parameter-entitiesparameter-entitiespreserve-system-identifiers |
S_OK (not parsing)
E_FAIL (parsing or illegal) |
server-http-request |
S_OK (not parsing)
E_FAIL (parsing) |
exhaustive-errrorsschema-validation |
E_FAIL |
| Other features | E_INVALIDARG |
The following describes the possible settings and access for features:
"exhaustive-errors"
True Report all validation errors.
False (default) Report only basic validation errors.
Access (parsing) Read-only; (not parsing) Read/write.
"http://xml.org/sax/features/external-general-entities"
True Include all external general (text) entities.
False (default) Do not include external general entities.
Access (parsing) Read-only; (not parsing) Read/write.
"http://xml.org/sax/features/external-parameter-entities"
True Include all external parameter entities, including the external document type definition (DTD) subset.
False (default) Do not include any external parameter entities, including the
external DTD subset.
Access (parsing) Read-only; (not parsing) Read/write.
"http://xml.org/sax/features/lexical-handler/parameter-entities"
True (default) For all parameter entities, all ISAXLexicalHandler event methods events are fired.
False For all parameter entities, the followingISAXLexicalHandlerevent methods are not fired:startEntity,endEntity,skippedEntity. This includes parameter entities defined in external document type definition (DTD) subsets.
Access (parsing) Read-only; (not parsing) Read/write.
"http://xml.org/sax/features/namespaces"
True (default) Makes namespace URIs and local names available during various method callbacks. For example, callbacks made using thestartElementandendElementmethods of theISAXContentHandlerinterface, or the methods of theISAXAttributesinterface. In addition, namespace declarations are returned by thestartPrefixMappingandendPrefixMappingmethods of theISAXContentHandlerinterface.
False Does not make namespace URIs and local names available during various method callbacks.
Access (parsing) Read-only; (not parsing) Read/write.
"http://xml.org/sax/features/namespace-prefixes"
True (default) Namespace declarations are ignored and namespace-prefixed attributes are treated the same as other attributes.
False Namespace declarations are omitted from the attribute collection, provided that the namespace feature is True.
Access (parsing) Read-only. (not parsing) Read/write.
"preserve-system-identifiers"
True System identifiers reported by the reader are not resolved. This applies to all system identifiers used with any lexical, declaration, or DTD handlers, as well as any entity resolvers that might be implemented. Internally, however, system identifiers are still resolved.
False (default) System identifiers reported by the reader are resolved.
Access (parsing) Read-only; (not parsing) Read/write.
"schema-validation"
True Include all external general (text) entities.
False (default) Do not validate when parsing.
Access (parsing) Read-only; (not parsing) Read/write.
"server-http-request"
True Use the server-safeServerXMLHTTPobject for theparseURLmethod.
False (default) Use the WinInet component to get data through HTTP for
parseURL.
Access (parsing) Read-only; (not parsing) Read/write.
To view reference information for Visual Basic or C/C++ only, click the Language Filter button
in the upper-left corner of the page.
Applies to: ISAXXMLReader Interface