Compartilhar via


max-xml-size Property

 

Specifies the maximum size for XML documents that the SAX reader will parse, in multiples of 1024 characters.

This property has security implications. For more information, see MSXML Security Overview and SAX2 Security.

JScript Syntax

oSaxReader.putProperty(strProp, intMaxSize);  
intMaxSize = oSaxReader.getProperty(strProp);  

Visual Basic Syntax

oSaxReader.putProperty
(strProp, intMaxSize)  
intMaxSize = oSaxReader.getProperty
(strProp)  

C/C++ Syntax

HRESULT putProperty(BSTR strProp, VARIANT intMaxSize);  
HRESULT getProperty(BSTR strProp, VARIANT intMaxSize);  

Value

strProp
A BSTR string whose value is "max-xml-size".

intMaxSize
A VARIANT/INT(VT_I4) value that specifies the maximum size limit for XML documents that the SAX reader will parse. A value of 0 permits documents of unlimited size. Negative values are treated as errors.

Remarks

This property can be used to indicate the maximum size to allow for an XML document in terms of number of blocks of 1024 characters. This property is equivalent of the DOM property, MaxXMLSize Property. It has the same range of valid values, i.e. 0..4194303 (2 ^ 22 minus 1). Note that this is the size of the physically read data, so entities will contribute to this size only once, even if used many times. If you attempt to read an XML document larger than the specified limit, the method used (either parse or parseURL) will return an error.

The default value for this property is 0, which means that documents of unlimited size are permitted.

Applies to

Interface: ISAXXMLReader

Method: putProperty | getProperty

Versioning

Implemented in: MSXML 3.0 and MSXML 6.0.