WsRemoveNode function (webservices.h)

Removes the node at the specified position from the xml buffer. If positioned on an element it will remove the element including all of its children and its corresponding end element, otherwise it will remove a single node.

The use of any API with a WS_XML_READER or WS_XML_WRITER that currently depends on this position or a child of this position will fail. The WS_XML_READER or WS_XML_WRITER must be repositioned before using further.

It will return WS_E_INVALID_OPERATION if the node is positioned on an end element or the root of the document. (See Windows Web Services Return Values.)

Calling WsSetReaderPosition or WsSetWriterPosition after calling WsRemoveNode will fail.

Syntax

HRESULT WsRemoveNode(
  [in]           const WS_XML_NODE_POSITION *nodePosition,
  [in, optional] WS_ERROR                   *error
);

Parameters

[in] nodePosition

The position of the node that should be removed.

[in, optional] 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
WS_E_INVALID_OPERATION
The operation is not allowed due to the current state of the object.

Requirements

Requirement Value
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