WsGetXmlAttribute function (webservices.h)

Finds the nearest xml attribute in scope with the specified localName and returns its value.
The returned value is placed on the specified heap.

Syntax

HRESULT WsGetXmlAttribute(
  WS_XML_READER       *reader,
  const WS_XML_STRING *localName,
  WS_HEAP             *heap,
  WCHAR               **valueChars,
  ULONG               *valueCharCount,
  WS_ERROR            *error
);

Parameters

reader

The reader for which the xml attribute will be searched.

localName

The localName of the xml attribute for which to search.

heap

The heap on which the resulting value should be allocated.

valueChars

The value of the attribute is stored here.

valueCharCount

The length of the valueChars.

error

Specifies where additional error information should be stored if the function fails.

Return value

This function can return one of these values.

Return code Description
E_INVALIDARG
One or more arguments are invalid.
S_FALSE
The xml attribute was not found.

Remarks

This function may only be used to obtain the values of attributes in scope that use the prefix "xml".

If no matching xml attribute is found, a zero length string will be returned for the value, and the function returns S_FALSE.

The reader does not do anything with xml attributes other than to surface them for inspection.

Requirements

   
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header webservices.h
Library WebServices.lib
DLL WebServices.dll