SetProperty (IXmlWriter)

 

Sets the specified property.

  
HRESULT SetProperty ([in] UINT nProperty, [in] LONG_PTR pValue);  

nProperty
The enum that identifies the property to be set.

pValue
The property value.

Returns S_OK if no error is generated. If an invalid property name is passed, returns E_NOTIMPL.

For information about the properties this method can set, see IXmlWriter Properties.

After writing starts, it is not recommended that you call this method.

The following code shows the use of SetProperty:

if (FAILED(hr = pWriter->SetProperty(XmlWriterProperty_Indent, TRUE)))  
{  
    wprintf(L"Error, Method: SetProperty XmlWriterProperty_Indent, error is %08.8lx", hr);  
    return -1;  
}  

Header: XmlLite.h

Library: XmlLite.lib

IXmlWriter Methods

Show: