System::Xml::XmlReader::Create method

XmlReader::Create(const SharedPtr<IO::Stream>&) method

Creates a new XmlReader instance using the specified stream with default settings.

static SharedPtr<XmlReader> System::Xml::XmlReader::Create(const SharedPtr<IO::Stream> &input)
ParameterTypeDescription
inputconst SharedPtr<IO::Stream>&The stream that contains the XML data. The XmlReader scans the first bytes of the stream looking for a byte order mark or other sign of encoding. When encoding is determined, the encoding is used to continue reading the stream, and processing continues parsing the input as a stream of (Unicode) characters.

ReturnValue

An object that is used to read the XML data in the stream.

See Also

XmlReader::Create(const SharedPtr<IO::Stream>&, const SharedPtr<XmlReaderSettings>&) method

Creates a new XmlReader instance with the specified stream and settings.

static SharedPtr<XmlReader> System::Xml::XmlReader::Create(const SharedPtr<IO::Stream> &input, const SharedPtr<XmlReaderSettings> &settings)
ParameterTypeDescription
inputconst SharedPtr<IO::Stream>&The stream that contains the XML data. The XmlReader scans the first bytes of the stream looking for a byte order mark or other sign of encoding. When encoding is determined, the encoding is used to continue reading the stream, and processing continues parsing the input as a stream of (Unicode) characters.
settingsconst SharedPtr<XmlReaderSettings>&The settings for the new XmlReader instance. This value can be nullptr.

ReturnValue

An object that is used to read the XML data in the stream.

See Also

XmlReader::Create(const SharedPtr<IO::Stream>&, SharedPtr<XmlReaderSettings>, const SharedPtr<XmlParserContext>&) method

Creates a new XmlReader instance using the specified stream, settings, and context information for parsing.

static SharedPtr<XmlReader> System::Xml::XmlReader::Create(const SharedPtr<IO::Stream> &input, SharedPtr<XmlReaderSettings> settings, const SharedPtr<XmlParserContext> &inputContext)
ParameterTypeDescription
inputconst SharedPtr<IO::Stream>&The stream that contains the XML data. The XmlReader scans the first bytes of the stream looking for a byte order mark or other sign of encoding. When encoding is determined, the encoding is used to continue reading the stream, and processing continues parsing the input as a stream of (Unicode) characters.
settingsSharedPtr<XmlReaderSettings>The settings for the new XmlReader instance. This value can be nullptr.
inputContextconst SharedPtr<XmlParserContext>&The context information required to parse the XML fragment. The context information can include the XmlNameTable to use, encoding, namespace scope, the current xml:lang and xml:space scope, base URI, and document type definition. This value can be nullptr.

ReturnValue

An object that is used to read the XML data in the stream.

See Also

XmlReader::Create(const SharedPtr<IO::Stream>&, SharedPtr<XmlReaderSettings>, const String&) method

Creates a new XmlReader instance using the specified stream, base URI, and settings.

static SharedPtr<XmlReader> System::Xml::XmlReader::Create(const SharedPtr<IO::Stream> &input, SharedPtr<XmlReaderSettings> settings, const String &baseUri)
ParameterTypeDescription
inputconst SharedPtr<IO::Stream>&The stream that contains the XML data. The XmlReader scans the first bytes of the stream looking for a byte order mark or other sign of encoding. When encoding is determined, the encoding is used to continue reading the stream, and processing continues parsing the input as a stream of (Unicode) characters.
settingsSharedPtr<XmlReaderSettings>The settings for the new XmlReader instance. This value can be nullptr.
baseUriconst String&The base URI for the entity or document being read. This value can be nullptr. Security Note The base URI is used to resolve the relative URI of the XML document. Do not use a base URI from an untrusted source.

ReturnValue

An object that is used to read the XML data in the stream.

See Also

XmlReader::Create(const SharedPtr<IO::TextReader>&) method

Creates a new XmlReader instance by using the specified text reader.

static SharedPtr<XmlReader> System::Xml::XmlReader::Create(const SharedPtr<IO::TextReader> &input)
ParameterTypeDescription
inputconst SharedPtr<IO::TextReader>&The text reader from which to read the XML data. A text reader returns a stream of Unicode characters, so the encoding specified in the XML declaration is not used by the XML reader to decode the data stream.

ReturnValue

An object that is used to read the XML data in the stream.

See Also

XmlReader::Create(const SharedPtr<IO::TextReader>&, const SharedPtr<XmlReaderSettings>&) method

Creates a new XmlReader instance by using the specified text reader and settings.

static SharedPtr<XmlReader> System::Xml::XmlReader::Create(const SharedPtr<IO::TextReader> &input, const SharedPtr<XmlReaderSettings> &settings)
ParameterTypeDescription
inputconst SharedPtr<IO::TextReader>&The text reader from which to read the XML data. A text reader returns a stream of Unicode characters, so the encoding specified in the XML declaration isn’t used by the XML reader to decode the data stream.
settingsconst SharedPtr<XmlReaderSettings>&The settings for the new XmlReader. This value can be nullptr.

ReturnValue

An object that is used to read the XML data in the stream.

See Also

XmlReader::Create(const SharedPtr<IO::TextReader>&, SharedPtr<XmlReaderSettings>, const SharedPtr<XmlParserContext>&) method

Creates a new XmlReader instance by using the specified text reader, settings, and context information for parsing.

static SharedPtr<XmlReader> System::Xml::XmlReader::Create(const SharedPtr<IO::TextReader> &input, SharedPtr<XmlReaderSettings> settings, const SharedPtr<XmlParserContext> &inputContext)
ParameterTypeDescription
inputconst SharedPtr<IO::TextReader>&The text reader from which to read the XML data. A text reader returns a stream of Unicode characters, so the encoding specified in the XML declaration isn’t used by the XML reader to decode the data stream.
settingsSharedPtr<XmlReaderSettings>The settings for the new XmlReader instance. This value can be nullptr.
inputContextconst SharedPtr<XmlParserContext>&The context information required to parse the XML fragment. The context information can include the XmlNameTable to use, encoding, namespace scope, the current xml:lang and xml:space scope, base URI, and document type definition. This value can be nullptr.

ReturnValue

An object that is used to read the XML data in the stream.

See Also

XmlReader::Create(const SharedPtr<IO::TextReader>&, SharedPtr<XmlReaderSettings>, const String&) method

Creates a new XmlReader instance by using the specified text reader, settings, and base URI.

static SharedPtr<XmlReader> System::Xml::XmlReader::Create(const SharedPtr<IO::TextReader> &input, SharedPtr<XmlReaderSettings> settings, const String &baseUri)
ParameterTypeDescription
inputconst SharedPtr<IO::TextReader>&The text reader from which to read the XML data. A text reader returns a stream of Unicode characters, so the encoding specified in the XML declaration isn’t used by the XmlReader to decode the data stream.
settingsSharedPtr<XmlReaderSettings>The settings for the new XmlReader instance. This value can be nullptr.
baseUriconst String&The base URI for the entity or document being read. This value can be nullptr. Security Note The base URI is used to resolve the relative URI of the XML document. Do not use a base URI from an untrusted source.

ReturnValue

An object that is used to read the XML data in the stream.

See Also

XmlReader::Create(const SharedPtr<XmlReader>&, SharedPtr<XmlReaderSettings>) method

Creates a new XmlReader instance by using the specified XML reader and settings.

static SharedPtr<XmlReader> System::Xml::XmlReader::Create(const SharedPtr<XmlReader> &reader, SharedPtr<XmlReaderSettings> settings)
ParameterTypeDescription
readerconst SharedPtr<XmlReader>&The object that you want to use as the underlying XML reader.
settingsSharedPtr<XmlReaderSettings>The settings for the new XmlReader instance. The conformance level of the XmlReaderSettings object must either match the conformance level of the underlying reader, or it must be set to ConformanceLevel::Auto.

ReturnValue

An object that is wrapped around the specified XmlReader object.

See Also

XmlReader::Create(const String&) method

Creates a new XmlReader instance with specified URI.

static SharedPtr<XmlReader> System::Xml::XmlReader::Create(const String &inputUri)
ParameterTypeDescription
inputUriconst String&The URI for the file that contains the XML data. The XmlUrlResolver class is used to convert the path to a canonical data representation.

ReturnValue

An object that is used to read the XML data in the stream.

See Also

XmlReader::Create(const String&, const SharedPtr<XmlReaderSettings>&) method

Creates a new XmlReader instance by using the specified URI and settings.

static SharedPtr<XmlReader> System::Xml::XmlReader::Create(const String &inputUri, const SharedPtr<XmlReaderSettings> &settings)
ParameterTypeDescription
inputUriconst String&The URI for the file containing the XML data. The XmlResolver object on the XmlReaderSettings object is used to convert the path to a canonical data representation. If XmlReaderSettings::get_XmlResolver value is nullptr, a new XmlUrlResolver object is used.
settingsconst SharedPtr<XmlReaderSettings>&The settings for the new XmlReader instance. This value can be nullptr.

ReturnValue

An object that is used to read the XML data in the stream.

See Also

XmlReader::Create(const String&, SharedPtr<XmlReaderSettings>, const SharedPtr<XmlParserContext>&) method

Creates a new XmlReader instance by using the specified URI, settings, and context information for parsing.

static SharedPtr<XmlReader> System::Xml::XmlReader::Create(const String &inputUri, SharedPtr<XmlReaderSettings> settings, const SharedPtr<XmlParserContext> &inputContext)
ParameterTypeDescription
inputUriconst String&The URI for the file containing the XML data. The XmlResolver object on the XmlReaderSettings object is used to convert the path to a canonical data representation. If XmlReaderSettings::get_XmlResolver value is nullptr, a new XmlUrlResolver object is used.
settingsSharedPtr<XmlReaderSettings>The settings for the new XmlReader instance. This value can be nullptr.
inputContextconst SharedPtr<XmlParserContext>&The context information required to parse the XML fragment. The context information can include the XmlNameTable to use, encoding, namespace scope, the current xml:lang and xml:space scope, base URI, and document type definition. This value can be nullptr.

ReturnValue

An object that is used to read the XML data in the stream.

See Also