WriteAttributeString (Compact 7)
3/12/2014
This method writes an attribute.
Syntax
HRESULT HRESULT WriteAttributeString (
cont WCHAR* pwszPrefix,
const WCHAR* pwszLocalName,
const WCHAR * pwszNamespaceUri,
const WCHAR* pwszValue
);
Arguments
- pwszPrefix
The namespace prefix for the attribute. NULL is equal to an empty string.
- pwszLocalName
The local name of the attribute. NULL is a valid value only if pwszPrefix has a value ofxmlns
.
- pwszNamespaceUri
The namespace URI for the attribute. NULL is equal to an empty string.
- pwszValue
The value of the attribute. NULL is equal to an empty string.
Return Value
This method returns S_OK if no error is generated.
Remarks
When the attribute name is xmlns
, this method also treats the attribute as a namespace declaration and associates the declared prefix with the specified namespace. In this case, if a namespace has already been specified for this element, that namespace is overridden and any child elements written with the original namespace are automatically written out as part of the new namespace.
If NULL is supplied for pwszLocalName and the value of pwszPrefix is not xmlns
, this method returns an error.