XmlValidatingReader()

XmlValidatingReader::XmlValidatingReader(const SharedPtr<XmlReader>&) constructor

Initializes a new instance of the XmlValidatingReader class that validates the content returned from the given XmlReader.

System::Xml::XmlValidatingReader::XmlValidatingReader(const SharedPtr<XmlReader> &reader)

Arguments

ParameterTypeDescription
readerconst SharedPtr<XmlReader>&The XmlReader to read from while validating. The current implementation supports only XmlTextReader.

XmlValidatingReader::XmlValidatingReader(const String&, XmlNodeType, const SharedPtr<XmlParserContext>&) constructor

Initializes a new instance of the XmlValidatingReader class with the specified values.

System::Xml::XmlValidatingReader::XmlValidatingReader(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 (see table below).
contextconst SharedPtr<XmlParserContext>&The XmlParserContext in which the XML fragment is to be parsed. This includes the NameTable to use, encoding, namespace scope, current xml:lang, and xml:space scope.

Remarks

The following table lists valid values for fragType and how the reader parses each of the different node types.

XmlNodeTypeFragment May Contain
ElementAny valid element content (for example, any combination of elements, comments, processing instructions, cdata, text, and entity references).
AttributeThe value of an attribute (the part inside the quotes).
DocumentThe contents of an entire XML document; this enforces document level rules.

XmlValidatingReader::XmlValidatingReader(const SharedPtr<IO::Stream>&, XmlNodeType, const SharedPtr<XmlParserContext>&) constructor

Initializes a new instance of the XmlValidatingReader class with the specified values.

System::Xml::XmlValidatingReader::XmlValidatingReader(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 determines what the fragment can contain (see table below).
contextconst SharedPtr<XmlParserContext>&The XmlParserContext in which the XML fragment is to be parsed. This includes the XmlNameTable to use, encoding, namespace scope, current xml:lang, and xml:space scope.

Remarks

The following table lists valid values for fragType and how the reader parses each of the different node types.

XmlNodeTypeFragment May Contain
ElementAny valid element content (for example, any combination of elements, comments, processing instructions, cdata, text, and entity references).
AttributeThe value of an attribute (the part inside the quotes).
DocumentThe contents of an entire XML document; this enforces document level rules.

See Also