System::Xml::XmlValidatingReader class

XmlValidatingReader class

Represents a reader that provides document type definition (DTD), XML-Data Reduced (XDR) schema, and XML Schema definition language (XSD) validation.

class XmlValidatingReader : public System::Xml::XmlReader,
                            public System::Xml::IXmlLineInfo,
                            public System::Xml::IXmlNamespaceResolver

Methods

MethodDescription
Close() overrideChanges the XmlReader::get_ReadState to Closed.
get_AttributeCount() overrideReturns the number of attributes on the current node.
get_BaseURI() overrideReturns the base URI of the current node.
get_CanReadBinaryContent() overrideReturns a value indicating whether the XmlValidatingReader implements the binary content read methods.
get_CanResolveEntity() overrideReturns a value indicating whether this reader can parse and resolve entities.
get_Depth() overrideReturns the depth of the current node in the XML document.
get_Encoding()Returns the encoding attribute for the document.
get_EntityHandling()Returns a value that specifies how the reader handles entities.
get_EOF() overrideReturns a value indicating whether the reader is positioned at the end of the stream.
get_HasValue() overrideReturns a value indicating whether the current node can have a XmlValidatingReader::get_Value other than String::Empty.
get_IsDefault() overrideReturns a value indicating whether the current node is an attribute that was generated from the default value defined in the document type definition (DTD) or schema.
get_IsEmptyElement() overrideReturns a value indicating whether the current node is an empty element (for example, ).
get_LineNumber() overrideReturns the current line number.
get_LinePosition() overrideReturns the current line position.
get_LocalName() overrideReturns the local name of the current node.
get_Name() overrideReturns the qualified name of the current node.
get_Namespaces()Returns a value indicating whether to do namespace support.
get_NamespaceURI() overrideReturns the namespace Uniform Resource Identifier (URI) (as defined in the World Wide Web Consortium (W3C) Namespace specification) of the node on which the reader is positioned.
get_NameTable() overrideReturns the XmlNameTable associated with this implementation.
get_NodeType() overrideReturns the type of the current node.
get_Prefix() overrideReturns the namespace prefix associated with the current node.
get_QuoteChar() overrideReturns the quotation mark character used to enclose the value of an attribute node.
get_Reader()Returns the XmlReader used to construct this XmlValidatingReader.
get_ReadState() overrideReturns the state of the reader.
get_Schemas()Returns a XmlSchemaCollection to use for validation.
get_SchemaType()Returns a schema type object.
get_ValidationType()Returns a value indicating the type of validation to perform.
get_Value() overrideReturns the text value of the current node.
get_XmlLang() overrideReturns the current xml:lang scope.
get_XmlSpace() overrideReturns the current xml:space scope.
GetAttribute(String) overrideReturns the value of the attribute with the specified name.
GetAttribute(String, String) overrideReturns the value of the attribute with the specified local name and namespace Uniform Resource Identifier (URI).
GetAttribute(int32_t) overrideReturns the value of the attribute with the specified index.
HasLineInfo() overrideReturns a value indicating whether the class can return line information.
LookupNamespace(const String&) overrideResolves a namespace prefix in the current element’s scope.
MoveToAttribute(String) overrideMoves to the attribute with the specified name.
MoveToAttribute(String, String) overrideMoves to the attribute with the specified local name and namespace Uniform Resource Identifier (URI).
MoveToAttribute(int32_t) overrideMoves to the attribute with the specified index.
MoveToElement() overrideMoves to the element that contains the current attribute node.
MoveToFirstAttribute() overrideMoves to the first attribute.
MoveToNextAttribute() overrideMoves to the next attribute.
Read() overrideReads the next node from the stream.
ReadAttributeValue() overrideParses the attribute value into one or more Text, EntityReference, or EndEntity nodes.
ReadContentAsBase64(ArrayPtr<uint8_t>, int32_t, int32_t) overrideReads the content and returns the Base64 decoded binary bytes.
ReadContentAsBinHex(ArrayPtr<uint8_t>, int32_t, int32_t) overrideReads the content and returns the BinHex decoded binary bytes.
ReadElementContentAsBase64(ArrayPtr<uint8_t>, int32_t, int32_t) overrideReads the element and decodes the Base64 content.
ReadElementContentAsBinHex(ArrayPtr<uint8_t>, int32_t, int32_t) overrideReads the element and decodes the BinHex content.
ReadString() overrideReads the contents of an element or text node as a string.
ReadTypedValue()Returns the runt-ime type for the specified XML Schema definition language (XSD) type.
ResolveEntity() overrideResolves the entity reference for EntityReference nodes.
set_EntityHandling(System::Xml::EntityHandling)Sets a value that specifies how the reader handles entities.
set_Namespaces(bool)Sets a value indicating whether to do namespace support.
set_ValidationType(System::Xml::ValidationType)Sets a value indicating the type of validation to perform.
set_XmlResolver(const SharedPtr<System::Xml::XmlResolver>&)Sets the XmlResolver used for resolving external document type definition (DTD) and schema location references. The XmlResolver is also used to handle any import or include elements found in XML Schema definition language (XSD) schemas.
ValidationEventHandler_add(Args…)Adds an event handler for receiving information about document type definition (DTD), XML-Data Reduced (XDR) schema, and XML Schema definition language (XSD) schema validation errors.
ValidationEventHandler_remove(Args…)Removes an event handler for receiving information about document type definition (DTD), XML-Data Reduced (XDR) schema, and XML Schema definition language (XSD) schema validation errors.
XmlValidatingReader(const SharedPtr<XmlReader>&)Initializes a new instance of the XmlValidatingReader class that validates the content returned from the given XmlReader.
XmlValidatingReader(const String&, XmlNodeType, const SharedPtr<XmlParserContext>&)Initializes a new instance of the XmlValidatingReader class with the specified values.
XmlValidatingReader(const SharedPtr<IO::Stream>&, XmlNodeType, const SharedPtr<XmlParserContext>&)Initializes a new instance of the XmlValidatingReader class with the specified values.

Typedefs

TypedefDescription
PtrAn alias for shared pointer to an instance of this class.

Remarks

Deprecated

This class is obsolete. It is recommended to use the XmlReaderSettings class and the XmlReader::Create method to create a validating XML reader.

Objects of this class should only be allocated using System::MakeObject() function. Never create instances of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

See Also