Click to Rate and Give Feedback
MSDN
MSDN Library
MSXML
SAX2
SAX2 Reference
SAX Reader Features
 use-schema-location Feature
Collapse All/Expand All Collapse All
use-schema-location Feature

This feature determines whether the SAX reader will allow (true) or prohibit (false) the use of external schemas using the xsi:schemaLocation or the xsi:noNamespaceSchemaLocation attributes.

This property has security implications. For more information, see MSXML Security Overview and SAX2 Security.

oSaxReader.putFeature(strFeature, vBool);
vBool= oSaxReader.getFeature(strFeature);
oSaxReader.putFeature(strFeature, vBool)
vBool= oSaxReader.getFeature(strFeature)
HRESULT putFeature(BSTR strFeature, VARIANT vBool);
HRESULT getFeature(BSTR strFeature, VARIANT* vBool);
strFeature

A BSTR string whose value is "use-schema-location".

vBool

A VARIANT_BOOL value of true or false that indicates the value of the feature. If this feature is set to true, the SAX reader allows the use of external schemas via the xsi:schemaLocation attribute or the noNamespaceSchemaLocation attribute. If false, the SAX reader will disallow them. The default is false.

This feature allows you to allow or disallow use of external schemas in SAX parsing. Prohibiting external schemas can help prevent a variety of security threats. Leaving this feature set to the default value of false avoids this potential problem.

When the SAX reader is actively parsing, this feature is read-only. When the SAX reader is not actively parsing, full (read/write) access is permitted.

Validate property settings Behavior of the parser

use-schema-location = true

schema-validation = true

Parsing an XML document that is not valid against the specified schema will result in an error.

use-schema-location = true

schema-validation = false

Parsing an XML document that is not valid against the specified schema will result in successful validation.

use-schema-location = false

schema-validation = true

Parsing an XML document that is not valid against the specified schema will result in an error.

Implemented in: MSXML 6.0

Concepts

SAX2 Security

© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker