Udostępnij za pośrednictwem


Creating XmlReader Objects

Microsoft Silverlight will reach end of support after October 2021. Learn more.

You create XmlReader instances by using the Create method. The XmlReaderSettings class specifies the set of features you want to enable on the XmlReader object.

XmlReaderSettings Class Overview

To enable or disable features of the reader, like specifying a resolver for the reader or enabling DTD processing, you set the properties on the XmlReaderSettings class. The XmlReaderSettings object is then passed to the Create method.

The following table lists the default property settings on the XmlReaderSettings class. For more information about these properties, follow the links to the property reference topics.

Property

Initial value

CheckCharacters

true.

ConformanceLevel

Document.

IgnoreComments

false.

IgnoreProcessingInstructions

false.

IgnoreWhitespace

false.

LineNumberOffset

0.

LinePositionOffset

0.

MaxCharactersFromEntities

0 (There is no limit on the number of characters that result from expanding entities).

MaxCharactersInDocument

0 (There is no limit on the size of the XML document).

NameTable

null.

DtdProcessing

Prohibit

XmlResolver

A new XmlXapResolver object.