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

ParameterTypeDescription
inputconst SharedPtr<IO::Stream>&The stream containing the XML data to read.

Exceptions

ExceptionDescription
ArgumentNullExceptioninput 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

ParameterTypeDescription
urlconst String&The URL to use for resolving external resources. The XmlTextReader::get_BaseURI is set to this value.
inputconst SharedPtr<IO::Stream>&The stream containing the XML data to read.

Exceptions

ExceptionDescription
ArgumentNullExceptioninput 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

ParameterTypeDescription
inputconst SharedPtr<IO::Stream>&The stream containing the XML data to read.
ntconst SharedPtr<XmlNameTable>&The XmlNameTable to use.

Exceptions

ExceptionDescription
NullReferenceExceptionThe 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

ParameterTypeDescription
urlconst String&The URL to use for resolving external resources. The XmlTextReader::get_BaseURI is set to this value. If url is nullptr, BaseURI is set to String::Empty.
inputconst SharedPtr<IO::Stream>&The stream containing the XML data to read.
ntconst SharedPtr<XmlNameTable>&The XmlNameTable to use.

Exceptions

ExceptionDescription
NullReferenceExceptionThe 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

ParameterTypeDescription
inputconst SharedPtr<IO::TextReader>&The TextReader containing the XML data to read.

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

ParameterTypeDescription
urlconst String&The URL to use for resolving external resources. The XmlTextReader::get_BaseURI is set to this value.
inputconst SharedPtr<IO::TextReader>&The TextReader containing the XML data to read.

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

ParameterTypeDescription
inputconst SharedPtr<IO::TextReader>&The TextReader containing the XML data to read.
ntconst SharedPtr<XmlNameTable>&The XmlNameTable to use.

Exceptions

ExceptionDescription
NullReferenceExceptionThe 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

ParameterTypeDescription
urlconst String&The URL to use for resolving external resources. The XmlTextReader::get_BaseURI is set to this value. If url is nullptr, BaseURI is set to String::Empty.
inputconst SharedPtr<IO::TextReader>&The TextReader containing the XML data to read.
ntconst SharedPtr<XmlNameTable>&The XmlNameTable to use.

Exceptions

ExceptionDescription
ArgumentNullExceptionThe 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

ParameterTypeDescription
xmlFragmentconst SharedPtr<IO::Stream>&The stream containing the XML fragment to parse.
fragTypeXmlNodeTypeThe XmlNodeType of the XML fragment. This also determines what the fragment can contain.
contextconst 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

ExceptionDescription
XmlExceptionfragType is not an Element, Attribute, or Document XmlNodeType::
ArgumentNullExceptionxmlFragment 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

ParameterTypeDescription
xmlFragmentconst String&The string containing the XML fragment to parse.
fragTypeXmlNodeTypeThe XmlNodeType of the XML fragment. This also determines what the fragment string can contain.
contextconst 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

ExceptionDescription
XmlExceptionfragType is not an Element, Attribute, or DocumentXmlNodeType.
ArgumentNullExceptionxmlFragment 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

ParameterTypeDescription
urlconst String&The URL for the file containing the XML data. The XmlTextReader::get_BaseURI is set to this value.

Exceptions

ExceptionDescription
FileNotFoundExceptionThe specified file cannot be found.
DirectoryNotFoundExceptionPart of the filename or directory cannot be found.
InvalidOperationExceptionurl is an empty string.
WebExceptionThe remote filename cannot be resolved. An error occurred while processing the request.
UriFormatExceptionurl 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

ParameterTypeDescription
urlconst String&The URL for the file containing the XML data to read.
ntconst SharedPtr<XmlNameTable>&The XmlNameTable to use.

Exceptions

ExceptionDescription
NullReferenceExceptionThe nt value is nullptr.
FileNotFoundExceptionThe specified file cannot be found.
DirectoryNotFoundExceptionPart of the filename or directory cannot be found.
InvalidOperationExceptionurl is an empty string.
WebExceptionThe remote filename cannot be resolved. An error occurred while processing the request.
UriFormatExceptionurl is not a valid URI.

See Also