XmlValidatingReader
Contents
[
Hide
]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
Method | Description |
---|---|
void Close() override | Changes the XmlReader::get_ReadState to Closed. |
static SharedPtr<XmlReader> Create(const String&) | Creates a new XmlReader instance with specified URI. |
static SharedPtr<XmlReader> Create(const String&, const SharedPtr<XmlReaderSettings>&) | Creates a new XmlReader instance by using the specified URI and settings. |
static SharedPtr<XmlReader> Create(const String&, SharedPtr<XmlReaderSettings>, const SharedPtr<XmlParserContext>&) | Creates a new XmlReader instance by using the specified URI, settings, and context information for parsing. |
static SharedPtr<XmlReader> Create(const SharedPtr<IO::Stream>&) | Creates a new XmlReader instance using the specified stream with default settings. |
static SharedPtr<XmlReader> Create(const SharedPtr<IO::Stream>&, const SharedPtr<XmlReaderSettings>&) | Creates a new XmlReader instance with the specified stream and settings. |
static SharedPtr<XmlReader> Create(const SharedPtr<IO::Stream>&, SharedPtr<XmlReaderSettings>, const String&) | Creates a new XmlReader instance using the specified stream, base URI, and settings. |
static SharedPtr<XmlReader> Create(const SharedPtr<IO::Stream>&, SharedPtr<XmlReaderSettings>, const SharedPtr<XmlParserContext>&) | Creates a new XmlReader instance using the specified stream, settings, and context information for parsing. |
static SharedPtr<XmlReader> Create(const SharedPtr<IO::TextReader>&) | Creates a new XmlReader instance by using the specified text reader. |
static SharedPtr<XmlReader> Create(const SharedPtr<IO::TextReader>&, const SharedPtr<XmlReaderSettings>&) | Creates a new XmlReader instance by using the specified text reader and settings. |
static SharedPtr<XmlReader> Create(const SharedPtr<IO::TextReader>&, SharedPtr<XmlReaderSettings>, const String&) | Creates a new XmlReader instance by using the specified text reader, settings, and base URI. |
static SharedPtr<XmlReader> Create(const SharedPtr<IO::TextReader>&, SharedPtr<XmlReaderSettings>, const SharedPtr<XmlParserContext>&) | Creates a new XmlReader instance by using the specified text reader, settings, and context information for parsing. |
static SharedPtr<XmlReader> Create(const SharedPtr<XmlReader>&, SharedPtr<XmlReaderSettings>) | Creates a new XmlReader instance by using the specified XML reader and settings. |
void Dispose() override | Releases all resources used by the current instance of the XmlReader class. |
virtual bool Equals(ptr) | Compares objects using C# Object.Equals semantics. |
static std::enable_if<IsSmartPtr<T1>::value&&IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&) | Compares reference type objects in C# style. |
static std::enable_if<!IsSmartPtr<T1>::value&&!IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&) | Compares value type objects in C# style. |
static bool Equals(float const&, float const&) | Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. |
static bool Equals(double const&, double const&) | Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. |
virtual bool FastCast(const Details::FastRttiBase&, void **) const | For internal purposes only. |
int32_t get_AttributeCount() override | Returns the number of attributes on the current node. |
String get_BaseURI() override | Returns the base URI of the current node. |
bool get_CanReadBinaryContent() override | Returns a value indicating whether the XmlValidatingReader implements the binary content read methods. |
virtual bool get_CanReadValueChunk() | Returns a value indicating whether the XmlReader implements the XmlReader::ReadValueChunk method. |
bool get_CanResolveEntity() override | Returns a value indicating whether this reader can parse and resolve entities. |
int32_t get_Depth() override | Returns the depth of the current node in the XML document. |
SharedPtr<System::Text::Encoding> get_Encoding() | Returns the encoding attribute for the document. |
System::Xml::EntityHandling get_EntityHandling() | Returns a value that specifies how the reader handles entities. |
bool get_EOF() override | Returns a value indicating whether the reader is positioned at the end of the stream. |
virtual bool get_HasAttributes() | Returns a value indicating whether the current node has any attributes. |
bool get_HasValue() override | Returns a value indicating whether the current node can have a XmlValidatingReader::get_Value other than String::Empty. |
bool get_IsDefault() override | Returns 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. |
bool get_IsEmptyElement() override | Returns a value indicating whether the current node is an empty element (for example, |
int32_t get_LineNumber() override | Returns the current line number. |
int32_t get_LinePosition() override | Returns the current line position. |
String get_LocalName() override | Returns the local name of the current node. |
String get_Name() override | Returns the qualified name of the current node. |
bool get_Namespaces() | Returns a value indicating whether to do namespace support. |
String get_NamespaceURI() override | Returns 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. |
SharedPtr<XmlNameTable> get_NameTable() override | Returns the XmlNameTable associated with this implementation. |
XmlNodeType get_NodeType() override | Returns the type of the current node. |
String get_Prefix() override | Returns the namespace prefix associated with the current node. |
char16_t get_QuoteChar() override | Returns the quotation mark character used to enclose the value of an attribute node. |
SharedPtr<XmlReader> get_Reader() | Returns the XmlReader used to construct this XmlValidatingReader. |
System::Xml::ReadState get_ReadState() override | Returns the state of the reader. |
virtual SharedPtr<Schema::IXmlSchemaInfo> get_SchemaInfo() | Returns the schema information that has been assigned to the current node as a result of schema validation. |
SharedPtr<Schema::XmlSchemaCollection> get_Schemas() | Returns a XmlSchemaCollection to use for validation. |
SharedPtr<Object> get_SchemaType() | Returns a schema type object. |
virtual SharedPtr<XmlReaderSettings> get_Settings() | Returns the XmlReaderSettings object used to create this XmlReader instance. |
System::Xml::ValidationType get_ValidationType() | Returns a value indicating the type of validation to perform. |
String get_Value() override | Returns the text value of the current node. |
virtual TypeInfo get_ValueType() | Returns The type for the current node. |
String get_XmlLang() override | Returns the current xml:lang scope. |
System::Xml::XmlSpace get_XmlSpace() override | Returns the current xml:space scope. |
String GetAttribute(String) override | Returns the value of the attribute with the specified name. |
String GetAttribute(String, String) override | Returns the value of the attribute with the specified local name and namespace Uniform Resource Identifier (URI). |
String GetAttribute(int32_t) override | Returns the value of the attribute with the specified index. |
Detail::SmartPtrCounter * GetCounter() | Gets reference counter data structure associated with the object. |
virtual int32_t GetHashCode() const | Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. |
virtual const TypeInfo& GetType() const | Gets actual type of object. Analog of C# System.Object.GetType() call. |
bool HasLineInfo() override | Returns a value indicating whether the class can return line information. |
virtual String idx_get(int32_t) | When overridden in a derived class, gets the value of the attribute with the specified index. |
virtual String idx_get(String) | When overridden in a derived class, gets the value of the attribute with the specified XmlReader::get_Name value. |
virtual String idx_get(String, String) | When overridden in a derived class, gets the value of the attribute with the specified XmlReader::get_LocalName and XmlReader::get_NamespaceURI values. |
virtual bool Is(const TypeInfo&) const | Check if object represents an instance of type described by targetType. Analog of C# ‘is’ operator. |
static bool IsName(const String&) | Returns a value indicating whether the string argument is a valid XML name. |
static bool IsNameToken(const String&) | Returns a value indicating whether or not the string argument is a valid XML name token. |
virtual bool IsStartElement() | Calls XmlReader::MoveToContent and tests if the current content node is a start tag or empty element tag. |
virtual bool IsStartElement(String) | Calls XmlReader::MoveToContent and tests if the current content node is a start tag or empty element tag and if the XmlReader::get_Name value of the element found matches the given argument. |
virtual bool IsStartElement(String, String) | Calls XmlReader::MoveToContent and tests if the current content node is a start tag or empty element tag and if the XmlReader::get_LocalName and XmlReader::get_NamespaceURI values of the element found match the given strings. |
void Lock() | Implements C# lock() statement locking. Call directly or use LockContext sentry object. |
String LookupNamespace(const String&) override | Resolves a namespace prefix in the current element’s scope. |
virtual ptr MemberwiseClone() const | Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. |
bool MoveToAttribute(String) override | Moves to the attribute with the specified name. |
bool MoveToAttribute(String, String) override | Moves to the attribute with the specified local name and namespace Uniform Resource Identifier (URI). |
void MoveToAttribute(int32_t) override | Moves to the attribute with the specified index. |
virtual XmlNodeType MoveToContent() | Checks whether the current node is a content (non-white space text, CDATA, Element, EndElement, EntityReference, or EndEntity) node. If the node is not a content node, the reader skips ahead to the next content node or end of file. It skips over nodes of the following type: ProcessingInstruction, DocumentType, Comment, Whitespace, or SignificantWhitespace. |
bool MoveToElement() override | Moves to the element that contains the current attribute node. |
bool MoveToFirstAttribute() override | Moves to the first attribute. |
bool MoveToNextAttribute() override | Moves to the next attribute. |
Object() | Creates object. Initializes all internal data structures. |
Object(Object const&) | Copy constructor. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses. |
Object& operator=(Object const&) | Assignment operator. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses. |
bool Read() override | Reads the next node from the stream. |
bool ReadAttributeValue() override | Parses the attribute value into one or more Text, EntityReference, or EndEntity nodes. |
virtual SharedPtr<Object> ReadContentAs(const TypeInfo&, SharedPtr<IXmlNamespaceResolver>) | Reads the content as an object of the type specified. |
int32_t ReadContentAsBase64(ArrayPtr<uint8_t>, int32_t, int32_t) override | Reads the content and returns the Base64 decoded binary bytes. |
int32_t ReadContentAsBinHex(ArrayPtr<uint8_t>, int32_t, int32_t) override | Reads the content and returns the BinHex decoded binary bytes. |
virtual bool ReadContentAsBoolean() | Reads the text content at the current position as a Boolean. |
virtual DateTime ReadContentAsDateTime() | Reads the text content at the current position as a DateTime object. |
virtual DateTimeOffset ReadContentAsDateTimeOffset() | Reads the text content at the current position as a DateTimeOffset object. |
virtual Decimal ReadContentAsDecimal() | Reads the text content at the current position as a Decimal object. |
virtual double ReadContentAsDouble() | Reads the text content at the current position as a double-precision floating-point number. |
virtual float ReadContentAsFloat() | Reads the text content at the current position as a single-precision floating point number. |
virtual int32_t ReadContentAsInt() | Reads the text content at the current position as a 32-bit signed integer. |
virtual int64_t ReadContentAsLong() | Reads the text content at the current position as a 64-bit signed integer. |
virtual SharedPtr<Object> ReadContentAsObject() | Reads the text content at the current position as an Object. |
virtual String ReadContentAsString() | Reads the text content at the current position as a String object. |
virtual SharedPtr<Object> ReadElementContentAs(const TypeInfo&, SharedPtr<IXmlNamespaceResolver>) | Reads the element content as the requested type. |
virtual SharedPtr<Object> ReadElementContentAs(const TypeInfo&, SharedPtr<IXmlNamespaceResolver>, String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the element content as the requested type. |
int32_t ReadElementContentAsBase64(ArrayPtr<uint8_t>, int32_t, int32_t) override | Reads the element and decodes the Base64 content. |
int32_t ReadElementContentAsBinHex(ArrayPtr<uint8_t>, int32_t, int32_t) override | Reads the element and decodes the BinHex content. |
virtual bool ReadElementContentAsBoolean() | Reads the current element and returns the contents as a Boolean object. |
virtual bool ReadElementContentAsBoolean(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a Boolean object. |
virtual DateTime ReadElementContentAsDateTime() | Reads the current element and returns the contents as a DateTime object. |
virtual DateTime ReadElementContentAsDateTime(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a DateTime object. |
virtual Decimal ReadElementContentAsDecimal() | Reads the current element and returns the contents as a Decimal object. |
virtual Decimal ReadElementContentAsDecimal(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a Decimal object. |
virtual double ReadElementContentAsDouble() | Reads the current element and returns the contents as a double-precision floating-point number. |
virtual double ReadElementContentAsDouble(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a double-precision floating-point number. |
virtual float ReadElementContentAsFloat() | Reads the current element and returns the contents as single-precision floating-point number. |
virtual float ReadElementContentAsFloat(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a single-precision floating-point number. |
virtual int32_t ReadElementContentAsInt() | Reads the current element and returns the contents as a 32-bit signed integer. |
virtual int32_t ReadElementContentAsInt(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a 32-bit signed integer. |
virtual int64_t ReadElementContentAsLong() | Reads the current element and returns the contents as a 64-bit signed integer. |
virtual int64_t ReadElementContentAsLong(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a 64-bit signed integer. |
virtual SharedPtr<Object> ReadElementContentAsObject() | Reads the current element and returns the contents as an Object. |
virtual SharedPtr<Object> ReadElementContentAsObject(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as an Object. |
virtual String ReadElementContentAsString() | Reads the current element and returns the contents as a String object. |
virtual String ReadElementContentAsString(String, String) | Checks that the specified local name and namespace URI matches that of the current element, then reads the current element and returns the contents as a String object. |
virtual String ReadElementString() | Reads a text-only element. However, it is recommended to use the XmlReader::ReadElementContentAsString method instead, because it provides a more straightforward way to handle this operation. |
virtual String ReadElementString(String) | Checks that the XmlReader::get_Name value of the element found matches the given string before reading a text-only element. However, it is recommended to use the XmlReader::ReadElementContentAsString method instead, because it provides a more straightforward way to handle this operation. |
virtual String ReadElementString(String, String) | Checks that the XmlReader::get_LocalName and XmlReader::get_NamespaceURI values of the element found matches the given strings before reading a text-only element. However, it is recommended to use the XmlReader::ReadElementContentAsString method instead, because it provides a more straightforward way to handle this operation. |
virtual void ReadEndElement() | Checks that the current content node is an end tag and advances the reader to the next node. |
virtual String ReadInnerXml() | When overridden in a derived class, reads all the content, including markup, as a string. |
virtual String ReadOuterXml() | When overridden in a derived class, reads the content, including markup, representing this node and all its children. |
virtual void ReadStartElement() | Checks that the current node is an element and advances the reader to the next node. |
virtual void ReadStartElement(String) | Checks that the current content node is an element with the given XmlReader::get_Name value and advances the reader to the next node. |
virtual void ReadStartElement(String, String) | Checks that the current content node is an element with the given XmlReader::get_LocalName and XmlReader::get_NamespaceURI values and advances the reader to the next node. |
String ReadString() override | Reads the contents of an element or text node as a string. |
virtual SharedPtr<XmlReader> ReadSubtree() | Returns a new XmlReader instance that can be used to read the current node, and all its descendants. |
virtual bool ReadToDescendant(String) | Advances the XmlReader to the next descendant element with the specified qualified name. |
virtual bool ReadToDescendant(String, String) | Advances the XmlReader to the next descendant element with the specified local name and namespace URI. |
virtual bool ReadToFollowing(String) | Reads until an element with the specified qualified name is found. |
virtual bool ReadToFollowing(String, String) | Reads until an element with the specified local name and namespace URI is found. |
virtual bool ReadToNextSibling(String) | Advances the XmlReader to the next sibling element with the specified qualified name. |
virtual bool ReadToNextSibling(String, String) | Advances the XmlReader to the next sibling element with the specified local name and namespace URI. |
SharedPtr<Object> ReadTypedValue() | Returns the runt-ime type for the specified XML Schema definition language (XSD) type. |
virtual int32_t ReadValueChunk(ArrayPtr<char16_t>, int32_t, int32_t) | Reads large streams of text embedded in an XML document. |
static bool ReferenceEquals(ptr const&, ptr const&) | Compares objects by reference. |
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, T const&) | Compares objects by reference. |
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, std::nullptr_t) | Reference-compares value type object with nullptr. |
bool ReferenceEquals(String const&, std::nullptr_t) | Specialization of Object::ReferenceEquals for case of string and nullptr. |
bool ReferenceEquals(String const&, String const&) | Specialization of Object::ReferenceEquals for case of strings. |
int RemovedSharedRefs(int) | Decreases shared reference count by specified value. |
void ResolveEntity() override | Resolves the entity reference for EntityReference nodes. |
void set_EntityHandling(System::Xml::EntityHandling) | Sets a value that specifies how the reader handles entities. |
void set_Namespaces(bool) | Sets a value indicating whether to do namespace support. |
void set_ValidationType(System::Xml::ValidationType) | Sets a value indicating the type of validation to perform. |
void 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. |
virtual void SetTemplateWeakPtr(uint32_t) | Set n’th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. |
int SharedCount() const | Gets current value of shared reference counter. |
Object * SharedRefAdded() | Increments shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
int SharedRefRemovedSafe() | Decrements and returns shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
virtual void Skip() | Skips the children of the current node. |
virtual String ToString() const | Analog of C# Object.ToString() method. Enables converting custom objects to string. |
static const TypeInfo& Type() | Implements C# typeof(System.Object) construct. |
void Unlock() | Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. |
void 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. |
void 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. |
Detail::SmartPtrCounter * WeakRefAdded() | Increments weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
void WeakRefRemoved() | Decrements weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
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. |
virtual ~Object() | Destroys object. Frees all internal data structures. |
Typedefs
Typedef | Description |
---|---|
Ptr | An 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
- Class XmlReader
- Class IXmlLineInfo
- Class IXmlNamespaceResolver
- Namespace System::Xml
- Library Aspose.Slides