Skip to content

Latest commit

 

History

History
351 lines (204 loc) · 19.7 KB

ne-webservices-ws_xml_writer_property_id.md

File metadata and controls

351 lines (204 loc) · 19.7 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NE:webservices.WS_XML_WRITER_PROPERTY_ID
WS_XML_WRITER_PROPERTY_ID (webservices.h)
Each xml writer property is identified by an ID and has an associated value.
WS_XML_WRITER_PROPERTY_ALLOW_FRAGMENT
WS_XML_WRITER_PROPERTY_ALLOW_INVALID_CHARACTER_REFERENCES
WS_XML_WRITER_PROPERTY_BUFFERS
WS_XML_WRITER_PROPERTY_BUFFER_MAX_SIZE
WS_XML_WRITER_PROPERTY_BUFFER_TRIM_SIZE
WS_XML_WRITER_PROPERTY_BYTES
WS_XML_WRITER_PROPERTY_BYTES_TO_CLOSE
WS_XML_WRITER_PROPERTY_BYTES_WRITTEN
WS_XML_WRITER_PROPERTY_CHARSET
WS_XML_WRITER_PROPERTY_COMPRESS_EMPTY_ELEMENTS
WS_XML_WRITER_PROPERTY_EMIT_UNCOMPRESSED_EMPTY_ELEMENTS
WS_XML_WRITER_PROPERTY_ID
WS_XML_WRITER_PROPERTY_ID enumeration [Web Services for Windows]
WS_XML_WRITER_PROPERTY_INDENT
WS_XML_WRITER_PROPERTY_INITIAL_BUFFER
WS_XML_WRITER_PROPERTY_IN_ATTRIBUTE
WS_XML_WRITER_PROPERTY_MAX_ATTRIBUTES
WS_XML_WRITER_PROPERTY_MAX_DEPTH
WS_XML_WRITER_PROPERTY_MAX_MIME_PARTS_BUFFER_SIZE
WS_XML_WRITER_PROPERTY_MAX_NAMESPACES
WS_XML_WRITER_PROPERTY_WRITE_DECLARATION
webservices/WS_XML_WRITER_PROPERTY_ALLOW_FRAGMENT
webservices/WS_XML_WRITER_PROPERTY_ALLOW_INVALID_CHARACTER_REFERENCES
webservices/WS_XML_WRITER_PROPERTY_BUFFERS
webservices/WS_XML_WRITER_PROPERTY_BUFFER_MAX_SIZE
webservices/WS_XML_WRITER_PROPERTY_BUFFER_TRIM_SIZE
webservices/WS_XML_WRITER_PROPERTY_BYTES
webservices/WS_XML_WRITER_PROPERTY_BYTES_TO_CLOSE
webservices/WS_XML_WRITER_PROPERTY_BYTES_WRITTEN
webservices/WS_XML_WRITER_PROPERTY_CHARSET
webservices/WS_XML_WRITER_PROPERTY_COMPRESS_EMPTY_ELEMENTS
webservices/WS_XML_WRITER_PROPERTY_EMIT_UNCOMPRESSED_EMPTY_ELEMENTS
webservices/WS_XML_WRITER_PROPERTY_ID
webservices/WS_XML_WRITER_PROPERTY_INDENT
webservices/WS_XML_WRITER_PROPERTY_INITIAL_BUFFER
webservices/WS_XML_WRITER_PROPERTY_IN_ATTRIBUTE
webservices/WS_XML_WRITER_PROPERTY_MAX_ATTRIBUTES
webservices/WS_XML_WRITER_PROPERTY_MAX_DEPTH
webservices/WS_XML_WRITER_PROPERTY_MAX_MIME_PARTS_BUFFER_SIZE
webservices/WS_XML_WRITER_PROPERTY_MAX_NAMESPACES
webservices/WS_XML_WRITER_PROPERTY_WRITE_DECLARATION
wsw.ws_xml_writer_property_id
wsw\ws_xml_writer_property_id.htm
wsw
c919eb01-bd15-4583-afcf-e46ac2fc9c8c
12/05/2018
WS_XML_WRITER_PROPERTY_ALLOW_FRAGMENT, WS_XML_WRITER_PROPERTY_ALLOW_INVALID_CHARACTER_REFERENCES, WS_XML_WRITER_PROPERTY_BUFFERS, WS_XML_WRITER_PROPERTY_BUFFER_MAX_SIZE, WS_XML_WRITER_PROPERTY_BUFFER_TRIM_SIZE, WS_XML_WRITER_PROPERTY_BYTES, WS_XML_WRITER_PROPERTY_BYTES_TO_CLOSE, WS_XML_WRITER_PROPERTY_BYTES_WRITTEN, WS_XML_WRITER_PROPERTY_CHARSET, WS_XML_WRITER_PROPERTY_COMPRESS_EMPTY_ELEMENTS, WS_XML_WRITER_PROPERTY_EMIT_UNCOMPRESSED_EMPTY_ELEMENTS, WS_XML_WRITER_PROPERTY_ID, WS_XML_WRITER_PROPERTY_ID enumeration [Web Services for Windows], WS_XML_WRITER_PROPERTY_INDENT, WS_XML_WRITER_PROPERTY_INITIAL_BUFFER, WS_XML_WRITER_PROPERTY_IN_ATTRIBUTE, WS_XML_WRITER_PROPERTY_MAX_ATTRIBUTES, WS_XML_WRITER_PROPERTY_MAX_DEPTH, WS_XML_WRITER_PROPERTY_MAX_MIME_PARTS_BUFFER_SIZE, WS_XML_WRITER_PROPERTY_MAX_NAMESPACES, WS_XML_WRITER_PROPERTY_WRITE_DECLARATION, webservices/WS_XML_WRITER_PROPERTY_ALLOW_FRAGMENT, webservices/WS_XML_WRITER_PROPERTY_ALLOW_INVALID_CHARACTER_REFERENCES, webservices/WS_XML_WRITER_PROPERTY_BUFFERS, webservices/WS_XML_WRITER_PROPERTY_BUFFER_MAX_SIZE, webservices/WS_XML_WRITER_PROPERTY_BUFFER_TRIM_SIZE, webservices/WS_XML_WRITER_PROPERTY_BYTES, webservices/WS_XML_WRITER_PROPERTY_BYTES_TO_CLOSE, webservices/WS_XML_WRITER_PROPERTY_BYTES_WRITTEN, webservices/WS_XML_WRITER_PROPERTY_CHARSET, webservices/WS_XML_WRITER_PROPERTY_COMPRESS_EMPTY_ELEMENTS, webservices/WS_XML_WRITER_PROPERTY_EMIT_UNCOMPRESSED_EMPTY_ELEMENTS, webservices/WS_XML_WRITER_PROPERTY_ID, webservices/WS_XML_WRITER_PROPERTY_INDENT, webservices/WS_XML_WRITER_PROPERTY_INITIAL_BUFFER, webservices/WS_XML_WRITER_PROPERTY_IN_ATTRIBUTE, webservices/WS_XML_WRITER_PROPERTY_MAX_ATTRIBUTES, webservices/WS_XML_WRITER_PROPERTY_MAX_DEPTH, webservices/WS_XML_WRITER_PROPERTY_MAX_MIME_PARTS_BUFFER_SIZE, webservices/WS_XML_WRITER_PROPERTY_MAX_NAMESPACES, webservices/WS_XML_WRITER_PROPERTY_WRITE_DECLARATION, wsw.ws_xml_writer_property_id
webservices.h
Windows
Windows 7 [desktop apps \| UWP apps]
Windows Server 2008 R2 [desktop apps \| UWP apps]
Windows
WS_XML_WRITER_PROPERTY_ID
19H1
WS_XML_WRITER_PROPERTY_ID
webservices/WS_XML_WRITER_PROPERTY_ID
c++
APIRef
kbSyntax
HeaderDef
WebServices.h
WS_XML_WRITER_PROPERTY_ID

WS_XML_WRITER_PROPERTY_ID enumeration

-description

Each xml writer property is identified by an ID and has an associated value. This enumeration is used within the WS_XML_WRITER_PROPERTY structure, which is used as a parameter to WsCreateWriter, WsSetOutput, WsSetOutputToBuffer, and WsWriteXmlBufferToBytes. It is also used directly as a parameter to WsGetWriterProperty.

-enum-fields

-field WS_XML_WRITER_PROPERTY_MAX_DEPTH:0

A ULONG that specifies the maximum depth of the document that the writer will permit.

Depth is measured at any point by the number of nested start elements.

A depth of 0 prevents any start elements from being written.

This property defaults to 32.

-field WS_XML_WRITER_PROPERTY_ALLOW_FRAGMENT:1

A WS_XML_WRITER_MTOM_ENCODING structure that specifies whether the writer will permit multiple elements and non-white space at the top level of the document. This property may not be set to TRUE with WS_XML_WRITER_MTOM_ENCODING.

This property defaults to FALSE.

-field WS_XML_WRITER_PROPERTY_MAX_ATTRIBUTES:2

A ULONG that specifies the maximum number of attributes the writer will permit on an element.

This property defaults to 128.

-field WS_XML_WRITER_PROPERTY_WRITE_DECLARATION:3

A BOOL that specifies if the writer should emit an appropriate xml declaration at the start of the document.

This property defaults to FALSE.

-field WS_XML_WRITER_PROPERTY_INDENT:4

A ULONG that specifies the how many spaces of indenting should be used to format the xml. If indent is zero, no formatting occurs.

This property defaults to 0.

-field WS_XML_WRITER_PROPERTY_BUFFER_TRIM_SIZE:5

A ULONG that specifies one of the following.

If the writer is using WS_XML_WRITER_BUFFER_OUTPUT, then this property is the maximum number of bytes the writer will retain across calls to WsSetOutput for purposes of buffering output.

If the writer is using WS_XML_WRITER_STREAM_OUTPUT, then this property is the maximum number of bytes the writer will retain across calls to WsSetOutput and WsFlushWriter for purposes of buffering output.

This property has no effect when specified with WsSetOutputToBuffer.

This property defaults to 4096.

-field WS_XML_WRITER_PROPERTY_CHARSET:6

A WS_CHARSET value that returns the character set the writer is using to encode the document. This value is only available for text documents.

-field WS_XML_WRITER_PROPERTY_BUFFERS:7

A WS_BUFFERS structure that returns a set of buffers containing the generated xml bytes.

If the writer is using WS_XML_WRITER_BUFFER_OUTPUT, then the all the generated bytes are returned, and the buffers are valid until WsSetOutput or WsFreeWriter is called.

If the writer is using WS_XML_WRITER_MTOM_ENCODING, then there must be no open elements. The supporting MIME parts will be generated and included in the returned buffers. Once this occurs, any API that attempts to write further to the xml document will return WS_E_INVALID_OPERATION. (See Windows Web Services Return Values.)

This property is not available when using WS_XML_WRITER_STREAM_OUTPUT.

This property is not available on a writer that is set to a WS_XML_BUFFER.

This may be less convenient but more efficient than using WS_XML_WRITER_PROPERTY_BYTES because the writer does not have to concatenate the buffers that comprise the document into a single buffer.

-field WS_XML_WRITER_PROPERTY_BUFFER_MAX_SIZE:8

A ULONG that specifies the maximum number of bytes the writer will buffer.

If the writer is using WS_XML_WRITER_BUFFER_OUTPUT, then this is the maximum number of bytes that will buffered for the entire document. Calls to WsFlushWriter have no effect.

If the writer is using WS_XML_WRITER_STREAM_OUTPUT, then this is the maxmimum amount of data that will be buffered between WsFlushWriter calls.

This property has no effect when specified with WsSetOutputToBuffer.

-field WS_XML_WRITER_PROPERTY_BYTES:9

A WS_BUFFERS structure that returns a single buffer containing the generated xml bytes.

If the writer is using WS_XML_WRITER_BUFFER_OUTPUT, then all the generated bytes are returned, and the buffer is valid until WsSetOutput or WsFreeWriter is called.

If the writer is using WS_XML_WRITER_MTOM_ENCODING, then there must be no open elements. The supporting MIME parts will be generated and included in the returned buffers. Once this occurs, any API that attempts to write further to the xml document will return WS_E_INVALID_OPERATION.

This property is not available when using WS_XML_WRITER_STREAM_OUTPUT.

This property is not available on a writer that is set to a WS_XML_BUFFER.

This may be more convenient but less efficient than using WS_XML_WRITER_PROPERTY_BUFFERS because the writer may need to concatenate the buffers that comprise the document into a single buffer.

-field WS_XML_WRITER_PROPERTY_IN_ATTRIBUTE:10

A BOOL that indicates that WsWriteStartAttribute has been called and the writer is positioned on attribute content.

-field WS_XML_WRITER_PROPERTY_MAX_MIME_PARTS_BUFFER_SIZE:11

A ULONG used with WS_XML_WRITER_MTOM_ENCODING. This specifies the maximum amount of data that will be buffered for purposes of writing the MIME parts. WsWriteBytes and WsPullBytes need to buffer data in order to emit the data as a separate MIME part that follows the document, and this can be used to limit how much is buffered.

This property defaults to 65536.

-field WS_XML_WRITER_PROPERTY_INITIAL_BUFFER:12

A WS_BYTES structure that contains a buffer that the writer may use for encoding the xml document. This is useful when an upper bound on the size of the generated xml data is known, or the caller wants to own the buffer in which the bytes are placed.

If the size specified is greater than or equal to WS_XML_WRITER_PROPERTY_BUFFER_MAX_SIZE, then the writer will not allocate from its internal buffers.

This buffer may appear as one of the buffers returned by the property WS_XML_WRITER_PROPERTY_BUFFERS or WS_XML_WRITER_PROPERTY_BYTES.

The caller must ensure that the buffer specified is valid for the lifetime of the writer.

-field WS_XML_WRITER_PROPERTY_ALLOW_INVALID_CHARACTER_REFERENCES:13

A BOOL used with WS_XML_WRITER_TEXT_ENCODING. Setting this to TRUE permits character references of characters considered invalid by XML 1.0 to be accepted.

Setting this property to TRUE may affect interoperability.

This property defaults to FALSE.

-field WS_XML_WRITER_PROPERTY_MAX_NAMESPACES:14

A ULONG that specifies the maximum number of xmlns unique declarations that may appear in scope at any point while writing the document.

This property defaults to 32.

-field WS_XML_WRITER_PROPERTY_BYTES_WRITTEN:15

A ULONG that specifies one of the following.

If the writer is using WS_XML_WRITER_BUFFER_OUTPUT, then this property returns the number of bytes that have been written to the writer.

If the writer is using WS_XML_WRITER_STREAM_OUTPUT, then this property returns the number of bytes that have been written to the writer since the last call to WsFlushWriter.

If the writer is currently writing an element start tag, then the size of the start tag is not included in the value returned.

This property is not available on a writer that was set using WsSetOutputToBuffer.

-field WS_XML_WRITER_PROPERTY_BYTES_TO_CLOSE:16

A ULONG that returns the maximum number of bytes necessary to close any open elements.

An application can use WS_XML_WRITER_PROPERTY_BYTES_WRITTEN and WS_XML_WRITER_PROPERTY_BYTES_TO_CLOSE to approximate how much additional data may be written to the document. When doing so, the application should take into account the encoding of the document being written.

This property is not available on a writer that was set using WsSetOutputToBuffer.

-field WS_XML_WRITER_PROPERTY_COMPRESS_EMPTY_ELEMENTS:17

A BOOL that controls how WsCopyNode copies elements with no content.

When this property is set to FALSE, WsCopyNode preserves whether each element is represented as a start/end tag pair, or as an empty element. When this property is set to TRUE, WsCopyNode will convert elements with no content to empty elements.

The binary encoding does not support empty elements. When using WsCopyNode with a writer using the binary encoding this property has no effect either way. All empty elements are converted into elements with no content.

By default, this property is FALSE.

For an input XML string like:

<?xml version="1.0" encoding="utf-8"?>
<container>
 <emptyElement />
 <emptyElementWithEndTag></emptyElementWithEndTag>
</container>

If this property is FALSE, WsCopyNode will generate the following xml:

<?xml version="1.0" encoding="utf-8"?>
<container>
 <emptyElement />
 <emptyElementWithEndTag></emptyElementWithEndTag>
</container>

If this property is TRUE, WsCopyNode will generate the following xml:

<?xml version="1.0" encoding="utf-8"?>
<container>
 <emptyElement />
 <emptyElementWithEndTag />
</container>

-field WS_XML_WRITER_PROPERTY_EMIT_UNCOMPRESSED_EMPTY_ELEMENTS:18

Windows 8 or later: A BOOL that controls how empty elements are emitted.

If set to FALSE, an element that is created by only calls to WsWriteStartElement and WsWriteEndElement will be emitted as follows:

<emptyElement />

If set to TRUE, that element will be emitted as follows:

<emptyElement></emptyElement>

The default is FALSE