Mono Class Library: System.Xml.XmlTextReader Overview | MembersSystem.Xml.XmlTextReader Constructor |
Constructs and initializes a new instance of the System.Xml.XmlTextReader class with the specified stream containing an XML fragment. [Edit]
|
- xmlFragment
- The System.IO.Stream containing the XML fragment to parse. [Edit]
- fragType
- The System.Xml.XmlNodeType of the XML fragment. This also determines what the fragment string can contain. (See table below.) [Edit]
- context
- The System.Xml.XmlParserContext in which the xmlFragment is to be parsed, or null. [Edit]
- fragType
- Documentation for this section has not yet been entered. [Edit]
- context
- Documentation for this section has not yet been entered. [Edit]
Type Reason ArgumentNullException xmlFragment is null. [Edit] System.Xml.XmlException fragType is not an Element, Attribute, or DocumentSystem.Xml.XmlNodeType. [Edit]
The following table lists valid values for fragType.
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. Note:If the XML fragment is an element or attribute, the root level rules for well-formed XML documents are not enforced.
This constructor calls System.Xml.XmlTextReader(context.NameTable) or, if context is null, System.Xml.XmlTextReader(newSystem.Xml.NameTable()) to initialize properties of the class. Afterwards, the following System.Xml.XmlTextReader properties are set to the specified values.
[Edit]
Property Value BaseUri context.BaseURI or, if context is null, string.Empty. Encoding context.Encoding or, if context or context.Encoding is null, 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 true. XmlLang If context is not null, context.XmlLang. If context is null, this property is not changed. XmlSpace If context is not null, context.XmlSpace. If context is null, this property is not changed.
Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0