WriteAttributeString

Writes an attribute.


HRESULT WriteAttributeString (cont WCHAR * pwszPrefix,
    const WCHAR * pwszLocalName, const WCHAR * pwszNamespaceUri,
    const WCHAR * pwszValue);

pwszPrefix

The namespace prefix for the attribute. NULL is equivalent to an empty string.

pwszLocalName

The local name of the attribute. NULL is a valid value only if pwszPrefix has a value of xmlns.

pwszNamespaceUri

The namespace URI for the attribute. NULL is equivalent to an empty string.

pwszValue

The value of the attribute. NULL is equivalent to an empty string.

Returns S_OK if no error is generated.

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.

Header: XmlLite.h

Library: XmlLite.lib

Show:
© 2014 Microsoft