Freigeben über


NormalizeAttributeValues Property

 

Specifies whether to enable (true) or disable (false) the normalization of attribute values. Setting the NormalizeAttributeValues property to true causes the DOM document to report normalized attribute values, and to serialize per the specification. Setting this property to false causes attribute values to have the existing, non-conformant behavior.

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

Script Syntax

domObj.setProperty(strProp, vBool);  
vBool = domObj.getProperty(strProp);  

Visual Basic Syntax

domObj.setProperty
(strProp, vBool)  
vBool = domObj.getProperty
(strProp)  

C\C++ Syntax

HRESULT setProperty(BSTR strProp, VARIANT vBool);  
HRESULT getProperty(BSTR strProp, VARIANT* vBool);  

Parameters

strProp
A BSTR string with the value of "NormalizeAttributeValues".

vBool
A VARIANT_BOOL value of true or false.

Remarks

When this property is set to true, an attribute that contains whitespace other than text will be normalized so that newlines and tabs are reported as a single space. Attribute values are normalized when retrieving attribute values using the value Property. This property also affects the serialization of XML using the save method and xml Property. For complete details about normalization of attribute values, see the World Wide Web Consortium (W3C) specifications for XML 1.0.

This property affects documents that are parsed with both the old parser and the new parser. If you do not set this property to true, the old parser does not report normalized attribute values, nor does it serialize per the specification. The new parser reports normalized attribute values, but unless you set this property to true, some aspects of serialization are not conformant to the specification. If you want attribute values to be normalized and serialized per the W3C specifications, set this property to true regardless of whether you are using the old or new parser.

Changing the value of this property after a document is loaded results in undefined behavior. Set this property before loading the document.

Versioning

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

Applies to

Interface: IXMLDOMDocument2

Methods: setProperty | getProperty

See Also

Second-Level DOM Properties