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 XML fragment. [Edit]
|
- xmlFragment
- A string 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 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. Note: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 XmlTextReader.ReadInnerXml.
This constructor calls XmlTextReader.XmlTextReader(context.NameTable) or, if context is null, XmlTextReader.XmlTextReader(newSystem.Xml.NameTable()) to initialize properties of the class. Following this call, if context is not null, 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, UTF-8. 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