Compartilhar via


SetProperty (IXmlWriterLite)

 

Sets the specified property.

Syntax

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

Arguments

nProperty
The enumeration value that identifies the property to be set.

pValue
The property value.

Return Value

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

Remarks

IXmlWriterLite uses the same properties as IXmlWriter. For information about the properties this method can set, see IXmlWriter Properties.

After writing starts, we do not recommend that you call this method.

The following example 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;  
}  

Requirements

Header: XmlLite.h

Library: XmlLite.lib

See Also

IXmlWriterLite Methods
IXmlWriter Properties