WS_XML_READER_PROPERTY_ID enumeration (webservices.h)

Identifies each XML reader property is and its associated value. This enumeration is used within the WS_XML_READER_PROPERTY structure, which is used as a parameter to WsCreateReader, WsSetInput, WsSetInputToBuffer, and WsReadXmlBufferFromBytes. It is also used directly as a parameter to WsGetReaderProperty.

Syntax

typedef enum {
  WS_XML_READER_PROPERTY_MAX_DEPTH = 0,
  WS_XML_READER_PROPERTY_ALLOW_FRAGMENT = 1,
  WS_XML_READER_PROPERTY_MAX_ATTRIBUTES = 2,
  WS_XML_READER_PROPERTY_READ_DECLARATION = 3,
  WS_XML_READER_PROPERTY_CHARSET = 4,
  WS_XML_READER_PROPERTY_ROW = 5,
  WS_XML_READER_PROPERTY_COLUMN = 6,
  WS_XML_READER_PROPERTY_UTF8_TRIM_SIZE = 7,
  WS_XML_READER_PROPERTY_STREAM_BUFFER_SIZE = 8,
  WS_XML_READER_PROPERTY_IN_ATTRIBUTE = 9,
  WS_XML_READER_PROPERTY_STREAM_MAX_ROOT_MIME_PART_SIZE = 10,
  WS_XML_READER_PROPERTY_STREAM_MAX_MIME_HEADERS_SIZE = 11,
  WS_XML_READER_PROPERTY_MAX_MIME_PARTS = 12,
  WS_XML_READER_PROPERTY_ALLOW_INVALID_CHARACTER_REFERENCES = 13,
  WS_XML_READER_PROPERTY_MAX_NAMESPACES = 14
} WS_XML_READER_PROPERTY_ID;

Constants

 
WS_XML_READER_PROPERTY_MAX_DEPTH
Value: 0
A ULONG that specifies the maximum depth of the document that the reader 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 read.


This property defaults to 32.


See WsCreateReader for security considerations.
WS_XML_READER_PROPERTY_ALLOW_FRAGMENT
Value: 1
A BOOL that
specifies whether the reader 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_READER_MTOM_ENCODING.


This property defaults to FALSE.
WS_XML_READER_PROPERTY_MAX_ATTRIBUTES
Value: 2
A ULONG that specifies the maximum number of attributes the reader will permit on an element.


This property defaults to 128.


See WsCreateReader for security considerations.
WS_XML_READER_PROPERTY_READ_DECLARATION
Value: 3
A BOOL that specifies if the reader should permit an xml declaration at the start of the document.


This property defaults to TRUE.
WS_XML_READER_PROPERTY_CHARSET
Value: 4
A WS_CHARSET value that returns the character set of the xml document. This value is only available for
text documents.


If the reader was initialized with a WS_CHARSET_AUTO then it will automatically determine this
value. The reader input source is streamed, then the reader must have enough data buffered to be able to
inspect initial byte order marks and the xml declaration. See WsFillReader.


If the reader was initialized with any other value, then this property simply returns that value.
WS_XML_READER_PROPERTY_ROW
Value: 5
A ULONGLONG that returns the 0 based row number of the node the reader is positioned on for text xml documents.
WS_XML_READER_PROPERTY_COLUMN
Value: 6
A ULONGLONG that returns the 0 based column number of the node the reader is positioned on for text xml documents.
WS_XML_READER_PROPERTY_UTF8_TRIM_SIZE
Value: 7
A ULONG that specifies the trim size of the internal buffer used by the
WS_XML_READER for performing UTF-16 to UTF-8 conversions. Increasing this value
uses more memory, but can reduce allocations when processing UTF-16 encoded documents.


This property defaults to 4096.
WS_XML_READER_PROPERTY_STREAM_BUFFER_SIZE
Value: 8
A ULONG that specifies the size of the buffer the WS_XML_READER will use when configured to use
WS_XML_READER_STREAM_INPUT. Increasing this value uses more memory, but
can reduce the number of times the WS_READ_CALLBACK is invoked.


This property defaults to 4096.
WS_XML_READER_PROPERTY_IN_ATTRIBUTE
Value: 9
Indicates that WsReadStartAttribute has been called and the reader is
positioned on attribute content.
WS_XML_READER_PROPERTY_STREAM_MAX_ROOT_MIME_PART_SIZE
Value: 10
A ULONG used with WS_XML_READER_STREAM_INPUT in conjunction with WS_XML_READER_MTOM_ENCODING.
This value specifies the maximum size of the root MIME part, which is the part that contains
the xml portion of the document. It has no effect when used with other encodings, or when used with
WS_XML_READER_BUFFER_INPUT.


This property defaults to 65536.
WS_XML_READER_PROPERTY_STREAM_MAX_MIME_HEADERS_SIZE
Value: 11
A ULONG used with WS_XML_READER_STREAM_INPUT in conjunction with WS_XML_READER_MTOM_ENCODING.
This value specifies the maximum size of any group of MIME headers that may appear in the document.
It has no effect when used with other encodings, or when used with WS_XML_READER_BUFFER_INPUT.


This property defaults to 256.
WS_XML_READER_PROPERTY_MAX_MIME_PARTS
Value: 12
A ULONG used with WS_XML_READER_MTOM_ENCODING. This value specifies the maximum number of MIME parts
that may appear in the document. It has no effect when used with other encodings.


This property defaults to 4096.
WS_XML_READER_PROPERTY_ALLOW_INVALID_CHARACTER_REFERENCES
Value: 13
A BOOL used with WS_XML_READER_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.
WS_XML_READER_PROPERTY_MAX_NAMESPACES
Value: 14
A ULONG that specifies the maximum number of xmlns unique declarations that may appear in scope at any point
while reading the document.


This property defaults to 32.


See WsCreateReader for security considerations.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Header webservices.h