XmlTextReader()
XmlTextReader::XmlTextReader(const SharedPtr<IO::Stream>&) constructor
Initializes a new instance of the XmlTextReader class with the specified stream.
System::Xml::XmlTextReader::XmlTextReader(const SharedPtr<IO::Stream> &input)
Arguments
| Parameter | Type | Description |
|---|
| input | const SharedPtr<IO::Stream>& | The stream containing the XML data to read. |
Exceptions
| Exception | Description |
|---|
| ArgumentNullException | input is nullptr. |
XmlTextReader::XmlTextReader(const String&, const SharedPtr<IO::Stream>&) constructor
Initializes a new instance of the XmlTextReader class with the specified URL and stream.
System::Xml::XmlTextReader::XmlTextReader(const String &url, const SharedPtr<IO::Stream> &input)
Arguments
Exceptions
| Exception | Description |
|---|
| ArgumentNullException | input is nullptr. |
XmlTextReader::XmlTextReader(const SharedPtr<IO::Stream>&, const SharedPtr<XmlNameTable>&) constructor
Initializes a new instance of the XmlTextReader class with the specified stream and XmlNameTable.
System::Xml::XmlTextReader::XmlTextReader(const SharedPtr<IO::Stream> &input, const SharedPtr<XmlNameTable> &nt)
Arguments
Exceptions
| Exception | Description |
|---|
| NullReferenceException | The input or nt value is nullptr. |
XmlTextReader::XmlTextReader(const String&, const SharedPtr<IO::Stream>&, const SharedPtr<XmlNameTable>&) constructor
Initializes a new instance of the XmlTextReader class with the specified URL, stream and XmlNameTable.
System::Xml::XmlTextReader::XmlTextReader(const String &url, const SharedPtr<IO::Stream> &input, const SharedPtr<XmlNameTable> &nt)
Arguments
Exceptions
| Exception | Description |
|---|
| NullReferenceException | The input or nt value is nullptr. |
XmlTextReader::XmlTextReader(const SharedPtr<IO::TextReader>&) constructor
Initializes a new instance of the XmlTextReader class with the specified TextReader.
System::Xml::XmlTextReader::XmlTextReader(const SharedPtr<IO::TextReader> &input)
Arguments
XmlTextReader::XmlTextReader(const String&, const SharedPtr<IO::TextReader>&) constructor
Initializes a new instance of the XmlTextReader class with the specified URL and TextReader.
System::Xml::XmlTextReader::XmlTextReader(const String &url, const SharedPtr<IO::TextReader> &input)
Arguments
XmlTextReader::XmlTextReader(const SharedPtr<IO::TextReader>&, const SharedPtr<XmlNameTable>&) constructor
Initializes a new instance of the XmlTextReader class with the specified TextReader and XmlNameTable.
System::Xml::XmlTextReader::XmlTextReader(const SharedPtr<IO::TextReader> &input, const SharedPtr<XmlNameTable> &nt)
Arguments
Exceptions
| Exception | Description |
|---|
| NullReferenceException | The nt value is nullptr. |
XmlTextReader::XmlTextReader(const String&, const SharedPtr<IO::TextReader>&, const SharedPtr<XmlNameTable>&) constructor
Initializes a new instance of the XmlTextReader class with the specified URL, TextReader and XmlNameTable.
System::Xml::XmlTextReader::XmlTextReader(const String &url, const SharedPtr<IO::TextReader> &input, const SharedPtr<XmlNameTable> &nt)
Arguments
Exceptions
| Exception | Description |
|---|
| ArgumentNullException | The nt value is nullptr. |
XmlTextReader::XmlTextReader(const SharedPtr<IO::Stream>&, XmlNodeType, const SharedPtr<XmlParserContext>&) constructor
Initializes a new instance of the XmlTextReader class with the specified stream, XmlNodeType, and XmlParserContext.
System::Xml::XmlTextReader::XmlTextReader(const SharedPtr<IO::Stream> &xmlFragment, XmlNodeType fragType, const SharedPtr<XmlParserContext> &context)
Arguments
| Parameter | Type | Description |
|---|
| xmlFragment | const SharedPtr<IO::Stream>& | The stream containing the XML fragment to parse. |
| fragType | XmlNodeType | The XmlNodeType of the XML fragment. This also determines what the fragment can contain. |
| context | const SharedPtr<XmlParserContext>& | The XmlParserContext in which the xmlFragment is to be parsed. This includes the XmlNameTable to use, encoding, namespace scope, the current xml:lang, and the xml:space scope. |
Exceptions
| Exception | Description |
|---|
| XmlException | fragType is not an Element, Attribute, or Document XmlNodeType:: |
| ArgumentNullException | xmlFragment is nullptr. |
XmlTextReader::XmlTextReader(const String&, XmlNodeType, const SharedPtr<XmlParserContext>&) constructor
Initializes a new instance of the XmlTextReader class with the specified string, XmlNodeType, and XmlParserContext.
System::Xml::XmlTextReader::XmlTextReader(const String &xmlFragment, XmlNodeType fragType, const SharedPtr<XmlParserContext> &context)
Arguments
| Parameter | Type | Description |
|---|
| xmlFragment | const String& | The string containing the XML fragment to parse. |
| fragType | XmlNodeType | The XmlNodeType of the XML fragment. This also determines what the fragment string can contain. |
| context | const SharedPtr<XmlParserContext>& | The XmlParserContext in which the xmlFragment is to be parsed. This includes the XmlNameTable to use, encoding, namespace scope, the current xml:lang, and the xml:space scope. |
Exceptions
| Exception | Description |
|---|
| XmlException | fragType is not an Element, Attribute, or DocumentXmlNodeType. |
| ArgumentNullException | xmlFragment is nullptr. |
XmlTextReader::XmlTextReader(const String&) constructor
Initializes a new instance of the XmlTextReader class with the specified file.
System::Xml::XmlTextReader::XmlTextReader(const String &url)
Arguments
Exceptions
| Exception | Description |
|---|
| FileNotFoundException | The specified file cannot be found. |
| DirectoryNotFoundException | Part of the filename or directory cannot be found. |
| InvalidOperationException | url is an empty string. |
| WebException | The remote filename cannot be resolved. An error occurred while processing the request. |
| UriFormatException | url is not a valid URI. |
XmlTextReader::XmlTextReader(const String&, const SharedPtr<XmlNameTable>&) constructor
Initializes a new instance of the XmlTextReader class with the specified file and XmlNameTable.
System::Xml::XmlTextReader::XmlTextReader(const String &url, const SharedPtr<XmlNameTable> &nt)
Arguments
Exceptions
| Exception | Description |
|---|
| NullReferenceException | The nt value is nullptr. |
| FileNotFoundException | The specified file cannot be found. |
| DirectoryNotFoundException | Part of the filename or directory cannot be found. |
| InvalidOperationException | url is an empty string. |
| WebException | The remote filename cannot be resolved. An error occurred while processing the request. |
| UriFormatException | url is not a valid URI. |
See Also