XML Buffer
An XML Buffer provides efficient in-memory storage for arbitrary XML data.
To read data from an XML Buffer, use a XML Reader and call WsSetInputToBuffer with the XML Buffer. The reader will be positioned at the start of the document.
To insert data into a buffer, use a XML Writer and call WsSetOutputToBuffer with the XML Buffer. The writer will be positioned at the end of the document.
Once a reader has been set to an XML Buffer, in addition to all of the XML Reader APIs, WsMoveReader may be used to navigate the reader through the document. WsGetReaderPosition and WsSetReaderPosition may also be used to record a position in the document and return to it later.
Once a writer has been set to an XML Buffer, in addition to all of the XML Writer APIs, WsMoveWriter may be used to navigate the writer through the document. WsGetWriterPosition and WsSetWriterPosition may also be used to record a position in the document and return to it later. The writer always inserts data before the node to which it is positioned.
Nodes may be deleted from the XML Buffer by obtaining the position of the node using WsGetReaderPosition or WsGetWriterPosition and then calling WsRemoveNode with that position. For elements, this will delete the element, all its children including its matching end element.
A position is represented by the value WS_XML_NODE_POSITION. Positions are specific to a particular XML Buffer, and are only valid as long as the XML Buffer is valid.
The following enumerations are used with XML buffers:
The following functions are used with XML buffers:
The following handle is used with XML buffers:
The following structures are used with XML buffers: