WsCopyNode function (webservices.h)

Copies the current node from the specified XML reader to the specified XML writer.

Syntax

HRESULT WsCopyNode(
  [in]           WS_XML_WRITER *writer,
  [in]           WS_XML_READER *reader,
  [in, optional] WS_ERROR      *error
);

Parameters

[in] writer

Pointer to the WS_XML_WRITER to which to copy the XML node.

[in] reader

Pointer to the WS_XML_READER from which to copy the XML node.

[in, optional] error

Pointer to a WS_ERROR structure that receives additional error information if the function fails.

Return value

If the function succeeds, it returns NO_ERROR; otherwise, it returns an HRESULT error code.

Return code Description
WS_E_INVALID_OPERATION
The operation is not allowed due to the current state of the object.
WS_E_INVALID_FORMAT
The input data was not in the expected format or did not have the expected value.
WS_E_QUOTA_EXCEEDED
A quota was exceeded.

Remarks

If the current node type is WS_XML_NODE_TYPE_ELEMENT,the current node, all its children, and the corresponding end element, are copied to the XML writer.

If the current node type is WS_XML_NODE_TYPE_BOF, nodes are copied until a node of type WS_XML_NODE_TYPE_EOF is reached. For information on node types, see the WS_XML_NODE_TYPE enumeration.

The reader will be positioned on the node following the node copied.

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