XML System.Xml [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.Xml.XmlReader Mono.Xml.IHasXmlParserContext System.Xml.IXmlLineInfo System.Xml.IXmlNamespaceResolver

Represents a reader that provides fast, non-cached, forward-only access to XML data.

This class provides forward-only, read-only access to a character stream of XML data. This class enforces the rules of well-formed XML but does not perform data validation.

This class implements the class and conforms to the W3C Extensible Markup Language (XML) 1.0 and the Namespaces in XML recommendations.

A given set of XML data is modeled as a tree of nodes. The different types of nodes are specified in the enumeration. The current node refers to the node on which the reader is positioned. The reader is advanced using any of the "read" or "moveto" methods. The following table lists the node properties exposed for the current node.

Property
Description
AttributeCount
The number of attributes on the node.
BaseUri
The base URI of the node.
Depth
The depth of the node in the tree.
HasAttributes
Whether the node has attributes. (Inherited from )
HasValue
Whether the node can have a text value.
IsDefault
Whether an node was generated from the default value defined in the DTD or schema.
IsEmptyElement
Whether an node is empty.
LocalName
The local name of the node.
Name
The qualified name of the node, equal to : .
NamespaceUri
The URI defining the namespace associated with the node.
NodeType
The of the node.
Prefix
A shorthand reference to the namespace associated with the node.
QuoteChar
The quotation mark character used to enclose the value of an attribute.
Value
The text value of the node.
XmlLang
The xml:lang scope within which the node resides.

This class does not expand default attributes or resolve general entities. Any general entities encountered are returned as a single empty node.

This class checks that a Document Type Definition (DTD) is well-formed, but does not validate using the DTD.

To read strongly typed data, use the class.

This class throws a on XML parse errors. After an exception is thrown, the state of the reader is not predictable. For example, the reported node type can be different than the actual node type of the current node.

- Constructor

  Constructs a new instance of the class.

  To be added.
  0
  1.0.5000.0
  2.0.0.0
- Constructor
  The containing the XML data to read.

  Constructs and initializes a new instance of the class with the specified stream.

  This constructor is equivalent to (, , new ()).

  is .
  0
  1.0.5000.0
  2.0.0.0
- Constructor
  A , set to the correct encoding, containing the XML data to read.

  Constructs and initializes a new instance of the class with the specified .

  This constructor is equivalent to (, , new ()).

  0
  1.0.5000.0
  2.0.0.0
- Constructor
  A specifying the URL for the file containing the XML data.

  Constructs and initializes a new instance of the class with the specified file.

  This constructor is equivalent to (, new ()).

  is .
  0
  1.0.5000.0
  2.0.0.0
- Constructor
  The to use.

  Constructs and initializes a new instance of the class with the specified name table.

  The public constructors call this constructor to initialize the following properties to the specified values. Derived classes can call this constructor to incorporate this behavior.

  Property
  Value
  Namespaces
  NameTable
  Normalization
  ReadState
  WhitespaceHandling
  XmlLang
  XmlSpace
  XmlResolver
  new ()
  is .
  0
  1.0.5000.0
  2.0.0.0
- Constructor
  The containing the XML data to read.
  The to use.

  Constructs and initializes a new instance of the class with the specified stream and name table.

  This constructor is equivalent to (, , ).

  or is .
  0
  1.0.5000.0
  2.0.0.0
- Constructor
  A , set to the correct encoding, containing the XML data to read.
  The to use.

  Constructs and initializes a new instance of the class with the specified , and name table.

  This constructor is equivalent to (, , ).

  is .
  0
  1.0.5000.0
  2.0.0.0
- Constructor
  A specifying the URL to use for resolving external resources.
  The containing the XML data to read.
  To be added.

  Constructs and initializes a new instance of the class with the specified URL and stream.

  This constructor is equivalent to (, , new ()).

  is .
  0
  1.0.5000.0
  2.0.0.0
- Constructor
  A specifying the URL to use for resolving external resources.
  A , set to the correct encoding, containing the XML data to read.
  To be added.

  Constructs and initializes a new instance of the class with the specified URL and .

  This constructor is equivalent to (, , new ()).

  0
  1.0.5000.0
  2.0.0.0
- Constructor
  A specifying the URL for the file containing the XML data to read.
  The to use.

  Constructs and initializes a new instance of the class with the specified file and name table.

  This constructor calls () to initialize properties of the class.

  is .
  is .
  0
  1.0.5000.0
  2.0.0.0
- Constructor
  The containing the XML fragment to parse.
  The of the XML fragment. This also determines what the fragment string can contain. (See table below.)

  The in which the is to be parsed, or .

  To be added.
  To be added.

  Constructs and initializes a new instance of the class with the specified stream containing an XML fragment.

  The following table lists valid values for .

  XmlNodeType
  Fragment Can Contain
  Element
  Any valid element content (for example, any combination of elements, comments, processing instructions, CDATA sections, text, and entity references).
  Attribute
  The value of an attribute (the part inside the quotes).
  Document
  The contents of an entire XML document; document level rules are enforced.

  If the XML fragment is an element or attribute, the root level rules for well-formed XML documents are not enforced.

  This constructor calls (.) or, if is , (()) to initialize properties of the class. Afterwards, the following properties are set to the specified values.

  Property
  Value
  BaseUri
  . or, if is , .
  Encoding
  . or, if or . is , the encoding corresponding to the byte-order mark at the beginning of the stream or, if no byte-order mark is found, UTF-8.
  Namespaces
  .
  XmlLang
  If is not , .. If is , this property is not changed.
  XmlSpace
  If is not , .. If is , this property is not changed.
  is .
  is not an , , or .
  0
  1.0.5000.0
  2.0.0.0
- Constructor
  A specifying the URL to use for resolving external resources.
  The containing the XML data to read.
  The to use.
  To be added.
  To be added.

  Constructs and initializes a new instance of the class with the specified URL, stream, and name table.

  This constructor calls () to initialize properties of the class.

  is set to the encoding corresponding to the byte-order mark at the beginning of the stream or, if no byte-order mark is found, UTF-8.

  is set to or, if is , to .

  or is .
  0
  1.0.5000.0
  2.0.0.0
- Constructor
  A specifying the URL to use for resolving external resources.
  A , set to the correct encoding, containing the XML data to read.
  The to use.
  To be added.
  To be added.

  Constructs and initializes a new instance of the class with the specified URL, , and name table.

  If is , a is thrown when the method is called.

  This constructor calls () to initialize properties of the class.

  is set to or, if is , to .

  To pass a user defined string that represents full, well-formed XML data, create a with the string and pass the

  to this constructor.

  is .
  0
  1.0.5000.0
  2.0.0.0
- Constructor
  A containing the XML fragment to parse.
  The of the XML fragment. This also determines what the fragment string can contain. (See table below.)

  The in which the is to be parsed, or .

  To be added.
  To be added.

  Constructs and initializes a new instance of the class with the specified XML fragment.

  The following table lists valid values for and how the reader will parse each of the different node types.

  XmlNodeType
  Fragment Can Contain
  Element
  Any valid element content (for example, any combination of elements, comments, processing instructions, CDATA sections, text, and entity references).
  Attribute
  The value of an attribute (the part inside the quotes).
  Document
  The contents of an entire XML document; document level rules are enforced.

  If the XML fragment is an element or attribute, root level rules for well-formed XML documents are not enforced.

  This constructor can handle strings returned from .

  This constructor calls (.) or, if is , (()) to initialize properties of the class. Following this call, if is not , the following properties are set to the specified values.

  Property
  Value
  BaseUri
  . or, if is , .
  Encoding
  . or, if or . is , UTF-8.
  XmlLang
  If is not , .. If is , this property is not changed.
  XmlSpace
  If is not , .. If is , this property is not changed.
  is .
  is not an , , or .
  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Int32

  Gets the number of attributes on the current node.

  A containing the number of attributes on the current node, or zero if the current node does not support attributes.

  This property is read-only.

  This property is relevant to the , , and node types of the enumeration. Other node types do not have attributes.

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.String

  Gets the base Uniform Resource Identifier (URI) of the current node.

  The base URI of the current node.

  This property is read-only.

  This property is set when the reader is instantiated and defaults to .

  A networked XML document is comprised of chunks of data aggregated using various W3C standard inclusion mechanisms and therefore contains nodes that come from different places. Document Type Definition (DTD) entities are an example of this, but this is not limited to DTDs. The base URI tells where these nodes come from.

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Boolean To be added. To be added. To be added. 2.0.0.0
- Property
  System.Boolean To be added. To be added. To be added. 2.0.0.0
- Property
  System.Boolean To be added. To be added. To be added. 1.0.5000.0 2.0.0.0
- Method
  System.Void

  Changes the to .

  This method releases any resources allocated by the current instance, changes the to , and calls the method of any underlying or

  instance.

  This method overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Int32

  Gets the depth of the current node in the XML document.

  A containing the depth of the current node in the XML document.

  This property is read-only.

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Text.Encoding

  Gets the encoding of the document.

  If the is , a ; otherwise .

  This property is read-only.

  If no encoding attribute exists, this property defaults to UTF-8.

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Xml.EntityHandling To be added. To be added. To be added. 2.0.0.0
- Property
  System.Boolean

  Gets a value indicating whether the is , signifying the reader is positioned at the end of the stream.

  A where indicates the reader is positioned at the end of the stream; otherwise, .

  This property is read-only.

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.String `` A specifying the zero-based index of the attribute relative to the containing element.

  Returns the value of the attribute with the specified index relative to the containing element.

  A containing the value of the specified attribute.

  This method does not move the reader.

  This method overrides .

  is less than 0, or greater than or equal to the of the containing element.

  returns zero for all node types except , , , and . Therefore, this exception is thrown if the reader is not positioned on one of these node types.

  See the (, ) method for an example using all three overloads of this method.

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.String `` A specifying the qualified name of the attribute.

  Returns the value of the attribute with the specified qualified name.

  A containing the value of the specified attribute, or if the attribute is not found. If is , is returned.

  This method does not move the reader.

  If the reader is positioned on a node, this method can be used to get the PUBLIC and SYSTEM literals.

  This method overrides .

  See the (, ) method for an example using all three overloads of this method.

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.String `` `` A specifying the local name of the attribute. A specifying the namespace URI of the attribute. To be added.

  Returns the value of the attribute with the specified local name and namespace URI.

  A containing the value of the specified attribute, or if the attribute is not found. If is , is returned.

  If is , the local namespace is searched for .

  This method does not move the reader.

  This method overrides .

  This example writes the value of the attributes from the following XML fragment to the console:

  <test xmlns:dt="urn:datatypes" dt:type="int"/>

  The second attribute value is retrieved using all three overloads of this method.

  `using System; using System.Xml; public class Reader { public static void Main() { string xmlFragment = @"<test xmlns:dt=""urn:datatypes"" dt:type=""int""/>"; NameTable nameTable = new NameTable(); XmlNamespaceManager xmlNsMan = new XmlNamespaceManager(nameTable); XmlParserContext xmlPContext = new XmlParserContext(null, xmlNsMan, null, XmlSpace.None); XmlTextReader xmlTReader = new XmlTextReader(xmlFragment,XmlNodeType.Element, xmlPContext); xmlTReader.Read(); Console.WriteLine( "{0}", xmlTReader.GetAttribute(0) ); string str1 = xmlTReader.GetAttribute(1); string str2 = xmlTReader.GetAttribute("dt:type"); string str3 = xmlTReader.GetAttribute("type", "urn:datatypes"); Console.WriteLine("{0} - {1} - {2}", str1, str2, str3); } }`

  The output is

  urn:datatypes

  int - int - int

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.Collections.Generic.IDictionary<System.String,System.String> `` To be added. To be added. To be added. To be added. 2.0.0.0
- Method
  System.IO.TextReader

  Returns the remainder of the buffered XML.

  The attached to the XML.

  This method calls the method, and then resets the to .

  Because performs a buffered read operation, it must be able to return the remainder of the unused buffer so that no data is lost. For example, this allows protocols (such as multi-part MIME) to package XML in the same stream.

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.Boolean To be added. To be added. To be added. 2.0.0.0
- Property
  System.Boolean

  Gets a value indicating whether the current node can have an associated text value.

  A where indicates the node on which the reader is currently positioned can have an associated text value; otherwise, .

  This property is read-only.

  The following members of the enumeration can have an associated value: , , , , , , , , and .

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Boolean

  Gets a value indicating whether the current node is an attribute that was generated from the default value defined in the DTD or schema.

  This property always returns the value .

  This property is read-only.

  This property applies only to attribute nodes.

  does not expand default attributes.

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Boolean

  Gets a value indicating whether the current node is an empty element (for example, <MyElement />).

  A where indicates the current node is an element ( equals ) that ends with "/>"; otherwise,.

  This property is read-only.

  A node is not generated for empty elements.

  This property determines the difference between the following:

  <item bar="123"/> ( is ).

  <item bar="123"> ( is ).

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.String `` A specifying the zero-based index of the attribute relative to the containing element.

  Retrieves the value of the attribute with the specified index relative to the containing element.

  A containing the value of the attribute.

  This property is read-only.

  This property does not move the reader.

  This property overrides the indexer.

  is less than 0 or greater than or equal to the of the containing element.

  returns zero for all node types except , , , and . Therefore, this exception is thrown if the reader is not positioned on one of these node types.

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.String `` A specifying the qualified name of the attribute.

  Retrieves the value of the attribute with the specified qualified name.

  A containing the value of the specified attribute, or if the attribute is not found.

  This property is read-only.

  This property does not move the reader.

  If the reader is positioned on a node, this method can be used to get the PUBLIC and SYSTEM literals.

  This property overrides the indexer.

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.String `` `` To be added. To be added.

  Retrieves the value of the attribute with the specified local name and namespace URI.

  A containing the value of the specified attribute, or if the attribute is not found.

  This property is read-only.

  This property does not move the reader.

  This property overrides the indexer.

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Int32

  Gets the current line number.

  A containing the current line number.

  This property is read-only.

  The constructors initialize this property to one.

  This property is most commonly used for error reporting, but can be called at any time.

  The start of a document is indicated when this property is 1 and the property is 1.

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Int32

  Gets the current position in a line.

  A containing the current line position.

  This property is read-only.

  The constructors initialize this property to one, which indicates the first character of text in a line.

  For example, <root>, contains the character 'r' at equal to 2 and the character '>' at equal to 6.

  This property is most commonly used for error reporting, but can be called at any time.

  The start of a document is indicated when this property is 1 and the property is 1.

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.String

  Gets the local name of the current node.

  A containing the local name of the current node or, for node types that do not have a name (like , , and so on), .

  This property is read-only.

  The local name is equivalent to with and the ':' character removed. For example, is "book" for the element <bk:book>.

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.String `` A specifying the prefix whose namespace URI is to be resolved. To return the default namespace, specify .

  Resolves a namespace prefix in the scope of the current element.

  A containing the namespace URI to which the prefix maps. If is , is not in , or no matching namespace is found, is returned.

  In the following XML, if the reader is positioned on the href attribute, the prefix "a" is resolved by calling ("a"). The returned string is "urn:456".

  <root xmlns:a="urn:456">

  <item>

  <ref href="a:b"/>

  </item>

  </root>

  This method overrides .

  The property of the current instance is and is . 0 1.0.5000.0 2.0.0.0
- Property
  System.Xml.XmlParserContext To be added. To be added. To be added. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` A specifying the zero-based index of the attribute relative to the containing element.

  Moves the position of the current instance to the attribute with the specified index relative to the containing element.

  After calling this method, the , , and properties reflect the properties of the new attribute.

  This method overrides .

  is less than 0 or greater than or equal to the of the containing element.

  returns zero for all node types except , , , and . Therefore, this exception is thrown if the reader is not positioned on one of these node types.

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.Boolean `` A specifying the qualified name of the attribute.

  Moves the position of the current instance to the attribute with the specified qualified name.

  A where indicates the attribute was found. If is , or the attribute was not found, is returned and the position of the reader does not change.

  After calling this method, the , , and properties reflect the properties of the new attribute.

  This method overrides .

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.Boolean `` `` A specifying the local name of the attribute. To be added.

  Moves the position of the current instance to the attribute with the specified local name and namespace URI.

  A where indicates the attribute was found. If is , or the attribute was not found, is returned and the position of the reader does not change.

  If is , the local namespace is searched for .

  After calling this method, the , , and properties reflect the properties of the new attribute.

  This method overrides .

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.Boolean

  Moves the position of the current instance to the node that contains the current node.

  A where indicates the reader was moved; indicates the reader was not positioned on an node and therefore was not moved.

  The , , and node types can contain attributes.

  This method overrides .

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.Boolean

  Moves the position of the current instance to the first attribute associated with the current node.

  A where indicates the current node contains at least one attribute; otherwise, .

  If is non-zero, the reader moves to the first attribute; otherwise, the position of the reader does not change.

  This method overrides .

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.Boolean

  Moves the position of the current instance to the next attribute associated with the current node.

  A where indicates the reader moved to the next attribute; if there were no more attributes.

  If the current node is an element node, this method is equivalent to .

  This method overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.String

  Gets the qualified name of the current node.

  A containing the qualified name of the current node or, for node types that do not have a name (like , , and so on), .

  This property is read-only.

  The name returned is dependent on the of the node. The following node types return the listed values. All other node types return an empty string.

  Node Type
  Name
  The name of the attribute.
  The document type name.
  The tag name.
  The name of the entity referenced.
  The target of the processing instruction.
  The literal string "xml".

  The qualified name is equivalent to the prefixed with and the ':' character. For example, is "bk:book" for the element <bk:book>.

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Boolean

  Gets or sets a value indicating whether the reader supports namespaces.

  A where indicates the reader supports namespaces; otherwise, . The default is .

  This property determines whether the reader supports the XML Namespaces specification (http://www.w3.org/TR/REC-xml-names). If this property is , namespaces are ignored and the reader allows names to contain multiple colon characters.

  If an attempt is made to set this property after a read operation has occurred, a is thrown.

  When attempting to set the property, the was not . 0 1.0.5000.0 2.0.0.0
- Property
  System.String

  Gets the namespace URI associated with the node on which the reader is positioned.

  A containing the namespace URI of the current node or, if no namespace URI is associated with the current node, .

  This property is read-only.

  This property is relevant to and nodes only.

  Namespaces conform to the W3C "Namespaces in XML" recommendation, REC-xml-names-19990114.

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Xml.XmlNameTable

  Gets the name table used by the current instance to store and look up element and attribute names, prefixes, and namespaces.

  The used by the current instance.

  This property is read-only.

  The class stores element and attribute names, prefixes, and namespaces as individual objects when a document is read.

  A qualified name is stored as a unique instance and separated into its prefix and local name parts, which are also stored as unique strings instances. For example, <somePrefix:someElement>, is stored as three strings, "somePrefix:someElement", "somePrefix", and "someElement".

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Xml.XmlNodeType

  Gets the of the current node.

  One of the members of the enumeration representing the type of the current node.

  This property is read-only.

  This property does not return the following types: , , , , or .

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Boolean

  Gets or sets a value indicating whether to normalize white space and attribute values.

  A where indicates to normalize; otherwise, . The default is .

  This property can be changed at any time before the current instance has been closed and takes affect on the next read operation.

  If is set to , this also disables character range checking for numeric entities. As a result, character entities, such as " &#0", are allowed.

  See "Attribute-Value Normalization" in the W3C XML 1.0 recommendation, REC-xml-19980210.

  When attempting to set the property, the current instance has been closed. 0 1.0.5000.0 2.0.0.0
- Property
  System.String

  Gets the namespace prefix associated with the current node.

  A containing the namespace prefix associated with the current node.

  This property is read-only.

  A namespace prefix is used as a reference for a namespace URI and is defined in an element declaration. For example, <someElement xmlns:bk='someURL'>, defines a prefix name "bk".

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Boolean To be added. To be added. To be added. 1.0.5000.0 2.0.0.0
- Property
  System.Char

  Gets the quotation mark character used to enclose the value of an attribute.

  A specifying the quotation mark character (" or ') used to enclose the value of an attribute.

  This property is read-only.

  This property applies only to an node.

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.Boolean

  Moves the position of the current instance to the next node in the stream, exposing its properties.

  A where indicates the node was read successfully, and indicates there were no more nodes to read.

  When a reader is first created and initialized, there is no information available. Calling this method is required to read the first node.

  This method overrides .

  An error occurred while parsing the XML. 0 1.0.5000.0 2.0.0.0
- Method
  System.Boolean

  Parses an attribute value into one or more and nodes.

  A where indicates the attribute value was parsed, and indicates the reader was not positioned on an attribute node or all the attribute values have been read.

  The class does not expand general entities; any encountered are returned as a single empty node ( is ).

  Use this method after calling to read through the text or entity reference nodes that make up the attribute value. The of the attribute value nodes is one plus the depth of the attribute node. When general entity references are stepped into or out of, the is incremented of decremented by one, respectively.

  This method overrides .

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.Int32 `` `` `` To be added. A specifying the zero-based index into where the method should begin to write. To be added. To be added.

  Reads and decodes the Base64 encoded contents of an element and stores the result in a byte buffer.

  A containing the number of bytes written to , or zero if the current instance is not positioned on an element.

  This method can be called successively to read large streams of embedded text.

  Base64 encoding represents byte sequences in a text form comprised of the 65 US-ASCII characters (A-Z, a-z, 0-9, +, /, =) where each character encodes 6 bits of the binary data.

  For more information on Base64 encoding, see RFC 2045 (http://www.ietf.org/rfc/2045).

  is .

  < 0, or < 0.

  - or -

  > . - .

  The Base64 sequence is not valid. 0 1.0.5000.0 2.0.0.0
- Method
  System.Int32 `` `` `` To be added. A specifying the zero-based index into where the method should begin to write. To be added. To be added.

  Reads and decodes the BinHex encoded contents of an element and stores the result in a byte buffer.

  A containing the number of bytes written to , or zero if the current instance is not positioned on an element.

  This method can be called successively to read large streams of embedded text.

  For information on BinHex encoding, see RFC 1741 (http://www.ietf.org/rfc/rfc1741).

  is .

  < 0, or < 0.

  -or-

  > . - .

  The BinHex sequence is not valid. 0 1.0.5000.0 2.0.0.0
- Method
  System.Int32 `` `` `` A array to store the content. To be added. To be added.

  Reads the text contents of an element into a character buffer.

  A containing the number of characters written to , or zero if the current instance is not positioned on an element.

  If the end of the character stream in the element is reached before the specified number of characters is read, the return value will be less than .

  This method has the following functionality:

  It is designed to work on element nodes only; it returns zero for other node types.

  It returns the actual character content including markup. There is no attempt to resolve entities, CDATA, or any other markup encountered.

  It ignores XML markup that is not well-formed. For example, when reading the following XML string <A>1<A>2</A>, 1<A>2</A> is returned. (It returns markup from the matching element pair and ignores others.)

  It does not do any normalization.

  When it has reached the end of the character stream, the reader is positioned after the end tag.

  Attribute read methods are not available.

  Using this method is the most efficient way to process very large streams of text embedded in an XML document. Rather than allocating large string objects, this method returns text content a buffer at a time.

  > . - .

  is .

  < 0, or < 0.

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.Int32 `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0
- Method
  System.Int32 `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0
- Method
  System.Int32 `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0
- Method
  System.Int32 `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0
- Property
  System.Xml.ReadState

  Gets the read state of the reader.

  One of the members of the enumeration.

  This property is read-only.

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Method
  System.String

  Reads the contents of an element or a text node as a string.

  A containing the contents of the or node, or if the reader is positioned on any other type of node.

  If positioned on an node, this method concatenates all , , , and node types, and returns the concatenated data as the element content. If none of these node types exist, is returned. Concatenation stops when any markup is encountered, which can occur in a mixed content model or when an element end tag is read.

  If positioned on an element node, this method performs the same concatenation from the node to the element end tag. If the reader is positioned on an attribute node, this method has the same functionality as if the reader were position on the element start tag.

  This method overrides .

  An invalid operation was attempted. An error occurred while parsing the XML. 2.0.0.0
- Method
  System.Void

  Resets the to .

  The , , , and properties are not changed by this method.

  This method enables the parsing of multiple XML documents in a single stream. When the end of an XML document is reached, this method resets the state of the current instance in preparation for the next XML document.

  The current instance was constructed with a . 0 1.0.5000.0 2.0.0.0
- Method
  System.Void

  Resolves the entity reference for nodes.

  does not support entity resolution.

  This method overrides .

  Any call to this method. 0 1.0.5000.0 2.0.0.0
- Property
  System.Xml.XmlReaderSettings To be added. To be added. To be added. 2.0.0.0
- Method
  System.Void To be added. To be added. 2.0.0.0
- Method
  System.Boolean To be added. To be added. To be added. 1.0.5000.0
- Method
  System.Collections.Generic.IDictionary<System.String,System.String> `` To be added. To be added. To be added. To be added. 2.0.0.0
- Method
  System.String `` To be added. To be added. To be added. To be added. 2.0.0.0
- Property
  System.String

  Gets the text value of the current node.

  A containing the text value of the current node.

  This property is read-only.

  The value returned depends on the . The following table lists node types that have a value to return. All other node types return .

  Node Type
  Value
  The value of the attribute.
  The content of the CDATA section.
  The content of the comment.
  The internal subset.
  The entire content, excluding the target.
  The white space in the scope of xml:space = "preserve".

  The content of the text node.

  The white space between markup.
  The content of the declaration.

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Xml.WhitespaceHandling

  Gets or sets a value that specifies the type of white space returned by the reader.

  One of the members of the enumeration. The default is (returns both significant and insignificant white space).

  This property can be changed at any time before the current instance is closed and takes affect on the next read operation.

  Because an instance of the class does not have DTD information available to it, nodes are only returned within the xml:space="preserve" scope.

  The value to be set is not one of the members of the enumeration. When setting the property, the is . 0 1.0.5000.0 2.0.0.0
- Property
  System.String

  Gets the current xml:lang scope.

  A containing the current xml:lang scope.

  This property is read-only.

  This property represents the xml:lang scope within which the current node resides. For example, the following is an XML fragment with xml:lang

  set to US English:

  <root xml:lang="en-us">

  <name>Fred</name>

  </root>

  When the reader is positioned on the name element, this property returns "en-us".

  The returned string is also in the for the reader.

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Xml.XmlResolver

  Sets the used for resolving DTD references.

  The to use for resolving DTD references.

  If this property is not set, the current instance uses a new instance of the class with default credentials. If this property is set to , any external DTD or entities encountered by the reader are not resolved.

  This property is write-only.

  The is used to resolve the location of the file loaded into the reader and also to resolve DTD references. For example, if the XML included the DOCTYPE declaration, <!DOCTYPE book SYSTEM book.dtd>, the reader resolves this external file and ensures that the DTD is well-formed. does not use the DTD for validation.

  This property can be changed at any time and takes affect on the next read operation.

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.Xml.XmlSpace

  Gets the current xml:space scope.

  One of the members of the enumeration. If no xml:space scope exists, this property defaults to .

  This property is read-only.

  The class has no DTD information available; therefore, nodes are only returned when inside the scope of xml:space = "preserve".

  This property overrides .

  0
  1.0.5000.0
  2.0.0.0
0