1 out of 1 rated this helpful - Rate this topic

ValidateOnParse Property [Second-level DOM]

This property is used to specify whether the XML parser should validate (true) this document against document type definition (DTD), schema, or schema cache on loading.

This property is supported in MSXML 6.0 and the default value is true.

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

domObj.setProperty(strProp, vBool);
vBool = domObj.getProperty(strProp);
domObj.setProperty(strProp, vBool)
vBool = domObj.getProperty(strProp)
HRESULT setProperty(BSTR strProp, VARIANT vBool);
HRESULT getProperty(BSTr strProp, VARIANT* vBool);

Parameters

strProp

A BSTR string whose value is "ValidateOnParse".

vBool

A VARIANT_BOOL value of true/false.

The following rules apply for the validation:

  1. If an external schema cache is set, the DTD will not be used to validate the document.

  2. If an external schema cache is not set, and the document has a DTD, XSD, or XDR schema file, will not be used to validate the document.

  3. Mixing XSD and XDR validation outside external cache is not permitted.

ValidateOnParse is also a first-level property on an XML DOM with the same effect. Thus, the following JScript code fragments accomplish the same:

dom.setProperty("ValidateOnParse", true);


and

dom.validateOnParse = true;


The second-level properties of ValidateOnParse, ResolveExternals and UseInlineSchema all deal with validation of an XML document. Collectively, they influence the behavior of the parser in different ways. For more information see the Remarks section of the UseInlineSchema property.

This property is supported in MSXML 6.0. The default value is true.

Did you find this helpful?
(1500 characters remaining)