Поделиться через


putProperty Method

 

Sets the value of a SAX reader property. The property name is any qualified Uniform Resource Identifier (URI).

Visual Basic Usage Syntax

oSAXXMLReader.putProperty
(strName, varValue)  

Parameters

strName
The property's name.

varValue
The corresponding data type of the property.

Return Values

The following table shows the return values for the putProperty method.

Property Returns
charset

 schema-declaration-handler
Sets property
declaration-handler

 lexical-handler

 max-xml-size

 schemas
Trappable error (if unable to set property).
dom-node

 xmldecl-encoding

 xmldecl-version

 xmldecl-standalone
Trappable error.
Other properties Trappable error

C/C++ Syntax

HRESULT putProperty(  
   [in] const wchar_t * pwchName,  
 [in] VARIANT varValue);  

Parameters

pwchName[in]
The property's name (zero-terminated Unicode string).

varValue[in]
The corresponding data type of the property.

Return Values

The following table lists the return values for the putProperty method.

Property Returns
charset

 schema-declaration-handler
S_OK (regardless of parsing mode)
declaration-handler

 lexical-handler

 schemas
S_OK (not parsing)

E_FAIL (parsing)
max-xml-size S_OK (not parsing)

E_FAIL (if set during parsing or you attempt to set a negative value)
dom-node

 xmldecl-encoding

 xmldecl-version

 xmldecl-standalone
E_FAIL
Other properties E_INVALIDARG

Remarks

Although a core set of properties is defined, a reader is not required to recognize any specific property names. Some property values may be available only in a specific context, such as before, during, or after a parse.

For more information on specific properties, see SAX Reader Properties.

Versioning

Implemented in: MSXML 3.0 and later

Applies to

ISAXXMLReader Interface

See Also

getProperty Method1