System::Xml::XmlValidatingReader Class Reference

Inherits System::Xml::XmlReader, System::Xml::IXmlLineInfo, and System::Xml::IXmlNamespaceResolver.

Public Types

using Ptr = SharedPtr< XmlValidatingReader >
 An alias for shared pointer to an instance of this class. More...
 
- Public Types inherited from System::Xml::XmlReader
using Ptr = SharedPtr< XmlReader >
 An alias for shared pointer to an instance of this class. More...
 
- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 

Public Member Functions

ASPOSECPP_SHARED_API XmlNodeType get_NodeType () override
 
ASPOSECPP_SHARED_API String get_Name () override
 
ASPOSECPP_SHARED_API String get_LocalName () override
 
ASPOSECPP_SHARED_API String get_NamespaceURI () override
 
ASPOSECPP_SHARED_API String get_Prefix () override
 
ASPOSECPP_SHARED_API bool get_HasValue () override
 
ASPOSECPP_SHARED_API String get_Value () override
 
ASPOSECPP_SHARED_API int32_t get_Depth () override
 
ASPOSECPP_SHARED_API String get_BaseURI () override
 
ASPOSECPP_SHARED_API bool get_IsEmptyElement () override
 
ASPOSECPP_SHARED_API bool get_IsDefault () override
 
ASPOSECPP_SHARED_API char16_t get_QuoteChar () override
 
ASPOSECPP_SHARED_API System::Xml::XmlSpace get_XmlSpace () override
 
ASPOSECPP_SHARED_API String get_XmlLang () override
 
ASPOSECPP_SHARED_API int32_t get_AttributeCount () override
 
ASPOSECPP_SHARED_API bool get_EOF () override
 
ASPOSECPP_SHARED_API System::Xml::ReadState get_ReadState () override
 
ASPOSECPP_SHARED_API SharedPtr< XmlNameTableget_NameTable () override
 
ASPOSECPP_SHARED_API bool get_CanResolveEntity () override
 
ASPOSECPP_SHARED_API bool get_CanReadBinaryContent () override
 
ASPOSECPP_SHARED_API int32_t get_LineNumber () override
 
ASPOSECPP_SHARED_API int32_t get_LinePosition () override
 
ASPOSECPP_SHARED_API SharedPtr< Objectget_SchemaType ()
 
ASPOSECPP_SHARED_API SharedPtr< XmlReaderget_Reader ()
 
ASPOSECPP_SHARED_API System::Xml::ValidationType get_ValidationType ()
 
ASPOSECPP_SHARED_API void set_ValidationType (System::Xml::ValidationType value)
 
ASPOSECPP_SHARED_API SharedPtr< Schema::XmlSchemaCollectionget_Schemas ()
 
ASPOSECPP_SHARED_API System::Xml::EntityHandling get_EntityHandling ()
 
ASPOSECPP_SHARED_API void set_EntityHandling (System::Xml::EntityHandling value)
 
ASPOSECPP_SHARED_API void set_XmlResolver (const SharedPtr< System::Xml::XmlResolver > &value)
 
ASPOSECPP_SHARED_API bool get_Namespaces ()
 
ASPOSECPP_SHARED_API void set_Namespaces (bool value)
 
ASPOSECPP_SHARED_API SharedPtr< System::Text::Encodingget_Encoding ()
 
ASPOSECPP_SHARED_API XmlValidatingReader (const SharedPtr< XmlReader > &reader)
 
ASPOSECPP_SHARED_API XmlValidatingReader (const String &xmlFragment, XmlNodeType fragType, const SharedPtr< XmlParserContext > &context)
 
ASPOSECPP_SHARED_API XmlValidatingReader (const SharedPtr< IO::Stream > &xmlFragment, XmlNodeType fragType, const SharedPtr< XmlParserContext > &context)
 
ASPOSECPP_SHARED_API String GetAttribute (String name) override
 
ASPOSECPP_SHARED_API String GetAttribute (String localName, String namespaceURI) override
 
ASPOSECPP_SHARED_API String GetAttribute (int32_t i) override
 
ASPOSECPP_SHARED_API bool MoveToAttribute (String name) override
 
ASPOSECPP_SHARED_API bool MoveToAttribute (String localName, String namespaceURI) override
 
ASPOSECPP_SHARED_API void MoveToAttribute (int32_t i) override
 
ASPOSECPP_SHARED_API bool MoveToFirstAttribute () override
 
ASPOSECPP_SHARED_API bool MoveToNextAttribute () override
 
ASPOSECPP_SHARED_API bool MoveToElement () override
 
ASPOSECPP_SHARED_API bool ReadAttributeValue () override
 
ASPOSECPP_SHARED_API bool Read () override
 
ASPOSECPP_SHARED_API void Close () override
 Changes the XmlReader::get_ReadState to Closed. More...
 
ASPOSECPP_SHARED_API String LookupNamespace (const String &prefix) override
 
ASPOSECPP_SHARED_API void ResolveEntity () override
 
ASPOSECPP_SHARED_API int32_t ReadContentAsBase64 (ArrayPtr< uint8_t > buffer, int32_t index, int32_t count) override
 
ASPOSECPP_SHARED_API int32_t ReadElementContentAsBase64 (ArrayPtr< uint8_t > buffer, int32_t index, int32_t count) override
 
ASPOSECPP_SHARED_API int32_t ReadContentAsBinHex (ArrayPtr< uint8_t > buffer, int32_t index, int32_t count) override
 
ASPOSECPP_SHARED_API int32_t ReadElementContentAsBinHex (ArrayPtr< uint8_t > buffer, int32_t index, int32_t count) override
 
ASPOSECPP_SHARED_API String ReadString () override
 
ASPOSECPP_SHARED_API bool HasLineInfo () override
 
template<class... Args>
void ValidationEventHandler_add (Args... value)
 
template<class... Args>
void ValidationEventHandler_remove (Args... value)
 
ASPOSECPP_SHARED_API SharedPtr< ObjectReadTypedValue ()
 
- Public Member Functions inherited from System::Xml::XmlReader
virtual ASPOSECPP_SHARED_API SharedPtr< XmlReaderSettingsget_Settings ()
 
virtual ASPOSECPP_SHARED_API SharedPtr< Schema::IXmlSchemaInfoget_SchemaInfo ()
 
virtual ASPOSECPP_SHARED_API TypeInfo get_ValueType ()
 
virtual ASPOSECPP_SHARED_API bool get_CanReadValueChunk ()
 
virtual ASPOSECPP_SHARED_API bool get_HasAttributes ()
 
virtual ASPOSECPP_SHARED_API SharedPtr< ObjectReadContentAsObject ()
 
virtual ASPOSECPP_SHARED_API bool ReadContentAsBoolean ()
 
virtual ASPOSECPP_SHARED_API DateTime ReadContentAsDateTime ()
 
virtual ASPOSECPP_SHARED_API DateTimeOffset ReadContentAsDateTimeOffset ()
 
virtual ASPOSECPP_SHARED_API double ReadContentAsDouble ()
 
virtual ASPOSECPP_SHARED_API float ReadContentAsFloat ()
 
virtual ASPOSECPP_SHARED_API Decimal ReadContentAsDecimal ()
 
virtual ASPOSECPP_SHARED_API int32_t ReadContentAsInt ()
 
virtual ASPOSECPP_SHARED_API int64_t ReadContentAsLong ()
 
virtual ASPOSECPP_SHARED_API String ReadContentAsString ()
 
virtual ASPOSECPP_SHARED_API SharedPtr< ObjectReadContentAs (const TypeInfo &returnType, SharedPtr< IXmlNamespaceResolver > namespaceResolver)
 
virtual ASPOSECPP_SHARED_API SharedPtr< ObjectReadElementContentAsObject ()
 
virtual ASPOSECPP_SHARED_API SharedPtr< ObjectReadElementContentAsObject (String localName, String namespaceURI)
 
virtual ASPOSECPP_SHARED_API bool ReadElementContentAsBoolean ()
 
virtual ASPOSECPP_SHARED_API bool ReadElementContentAsBoolean (String localName, String namespaceURI)
 
virtual ASPOSECPP_SHARED_API DateTime ReadElementContentAsDateTime ()
 
virtual ASPOSECPP_SHARED_API DateTime ReadElementContentAsDateTime (String localName, String namespaceURI)
 
virtual ASPOSECPP_SHARED_API double ReadElementContentAsDouble ()
 
virtual ASPOSECPP_SHARED_API double ReadElementContentAsDouble (String localName, String namespaceURI)
 
virtual ASPOSECPP_SHARED_API float ReadElementContentAsFloat ()
 
virtual ASPOSECPP_SHARED_API float ReadElementContentAsFloat (String localName, String namespaceURI)
 
virtual ASPOSECPP_SHARED_API Decimal ReadElementContentAsDecimal ()
 
virtual ASPOSECPP_SHARED_API Decimal ReadElementContentAsDecimal (String localName, String namespaceURI)
 
virtual ASPOSECPP_SHARED_API int32_t ReadElementContentAsInt ()
 
virtual ASPOSECPP_SHARED_API int32_t ReadElementContentAsInt (String localName, String namespaceURI)
 
virtual ASPOSECPP_SHARED_API int64_t ReadElementContentAsLong ()
 
virtual ASPOSECPP_SHARED_API int64_t ReadElementContentAsLong (String localName, String namespaceURI)
 
virtual ASPOSECPP_SHARED_API String ReadElementContentAsString ()
 
virtual ASPOSECPP_SHARED_API String ReadElementContentAsString (String localName, String namespaceURI)
 
virtual ASPOSECPP_SHARED_API SharedPtr< ObjectReadElementContentAs (const TypeInfo &returnType, SharedPtr< IXmlNamespaceResolver > namespaceResolver)
 
virtual ASPOSECPP_SHARED_API SharedPtr< ObjectReadElementContentAs (const TypeInfo &returnType, SharedPtr< IXmlNamespaceResolver > namespaceResolver, String localName, String namespaceURI)
 
virtual ASPOSECPP_SHARED_API String idx_get (int32_t i)
 
virtual ASPOSECPP_SHARED_API String idx_get (String name)
 
virtual ASPOSECPP_SHARED_API String idx_get (String name, String namespaceURI)
 
virtual ASPOSECPP_SHARED_API void Skip ()
 Skips the children of the current node. More...
 
virtual ASPOSECPP_SHARED_API int32_t ReadValueChunk (ArrayPtr< char16_t > buffer, int32_t index, int32_t count)
 
virtual ASPOSECPP_SHARED_API XmlNodeType MoveToContent ()
 
virtual ASPOSECPP_SHARED_API void ReadStartElement ()
 
virtual ASPOSECPP_SHARED_API void ReadStartElement (String name)
 
virtual ASPOSECPP_SHARED_API void ReadStartElement (String localname, String ns)
 
virtual ASPOSECPP_SHARED_API String ReadElementString ()
 
virtual ASPOSECPP_SHARED_API String ReadElementString (String name)
 
virtual ASPOSECPP_SHARED_API String ReadElementString (String localname, String ns)
 
virtual ASPOSECPP_SHARED_API void ReadEndElement ()
 
virtual ASPOSECPP_SHARED_API bool IsStartElement ()
 
virtual ASPOSECPP_SHARED_API bool IsStartElement (String name)
 
virtual ASPOSECPP_SHARED_API bool IsStartElement (String localname, String ns)
 
virtual ASPOSECPP_SHARED_API bool ReadToFollowing (String name)
 
virtual ASPOSECPP_SHARED_API bool ReadToFollowing (String localName, String namespaceURI)
 
virtual ASPOSECPP_SHARED_API bool ReadToDescendant (String name)
 
virtual ASPOSECPP_SHARED_API bool ReadToDescendant (String localName, String namespaceURI)
 
virtual ASPOSECPP_SHARED_API bool ReadToNextSibling (String name)
 
virtual ASPOSECPP_SHARED_API bool ReadToNextSibling (String localName, String namespaceURI)
 
virtual ASPOSECPP_SHARED_API String ReadInnerXml ()
 
virtual ASPOSECPP_SHARED_API String ReadOuterXml ()
 
virtual ASPOSECPP_SHARED_API SharedPtr< XmlReaderReadSubtree ()
 
ASPOSECPP_SHARED_API void Dispose () override
 Releases all resources used by the current instance of the XmlReader class. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared reference counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Additional Inherited Members

- Static Public Member Functions inherited from System::Xml::XmlReader
static ASPOSECPP_SHARED_API bool IsName (const String &str)
 
static ASPOSECPP_SHARED_API bool IsNameToken (const String &str)
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const String &inputUri)
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const String &inputUri, const SharedPtr< XmlReaderSettings > &settings)
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const String &inputUri, SharedPtr< XmlReaderSettings > settings, const SharedPtr< XmlParserContext > &inputContext)
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::Stream > &input)
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::Stream > &input, const SharedPtr< XmlReaderSettings > &settings)
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::Stream > &input, SharedPtr< XmlReaderSettings > settings, const String &baseUri)
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::Stream > &input, SharedPtr< XmlReaderSettings > settings, const SharedPtr< XmlParserContext > &inputContext)
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::TextReader > &input)
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::TextReader > &input, const SharedPtr< XmlReaderSettings > &settings)
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::TextReader > &input, SharedPtr< XmlReaderSettings > settings, const String &baseUri)
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::TextReader > &input, SharedPtr< XmlReaderSettings > settings, const SharedPtr< XmlParserContext > &inputContext)
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< XmlReader > &reader, SharedPtr< XmlReaderSettings > settings)
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Implements C# typeof(System.Object) construct. More...
 

Detailed Description

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

Deprecated:
This class is obsolete. It is recommended to use the XmlReaderSettings class and the XmlReader::Create method to create a validating XML reader.
Attention
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.

Member Typedef Documentation

◆ Ptr

An alias for shared pointer to an instance of this class.

Constructor & Destructor Documentation

◆ XmlValidatingReader() [1/3]

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

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

Parameters
readerThe XmlReader to read from while validating. The current implementation supports only XmlTextReader.
Exceptions
ArgumentExceptionThe reader specified is not an XmlTextReader.

◆ XmlValidatingReader() [2/3]

ASPOSECPP_SHARED_API System::Xml::XmlValidatingReader::XmlValidatingReader ( const String xmlFragment,
XmlNodeType  fragType,
const SharedPtr< XmlParserContext > &  context 
)

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

Parameters
xmlFragmentThe string containing the XML fragment to parse.
fragTypeThe XmlNodeType of the XML fragment. This also determines what the fragment string can contain (see table below).
contextThe 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.
Exceptions
XmlExceptionfragType is not one of the node types listed in the table below.

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

XmlNodeType Fragment 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() [3/3]

ASPOSECPP_SHARED_API System::Xml::XmlValidatingReader::XmlValidatingReader ( const SharedPtr< IO::Stream > &  xmlFragment,
XmlNodeType  fragType,
const SharedPtr< XmlParserContext > &  context 
)

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

Parameters
xmlFragmentThe stream containing the XML fragment to parse.
fragTypeThe XmlNodeType of the XML fragment. This determines what the fragment can contain (see table below).
contextThe 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.
Exceptions
XmlExceptionfragType is not one of the node types listed in the table below.

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

XmlNodeType Fragment 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.

Member Function Documentation

◆ Close()

ASPOSECPP_SHARED_API void System::Xml::XmlValidatingReader::Close ( )
overridevirtual

Changes the XmlReader::get_ReadState to Closed.

Reimplemented from System::Xml::XmlReader.

◆ get_AttributeCount()

ASPOSECPP_SHARED_API int32_t System::Xml::XmlValidatingReader::get_AttributeCount ( )
overridevirtual

Returns the number of attributes on the current node.

Returns
The number of attributes on the current node. This number includes default attributes.

Implements System::Xml::XmlReader.

◆ get_BaseURI()

ASPOSECPP_SHARED_API String System::Xml::XmlValidatingReader::get_BaseURI ( )
overridevirtual

Returns the base URI of the current node.

Returns
The base URI of the current node.

Implements System::Xml::XmlReader.

◆ get_CanReadBinaryContent()

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::get_CanReadBinaryContent ( )
overridevirtual

Returns a value indicating whether the XmlValidatingReader implements the binary content read methods.

Returns
true if the binary content read methods are implemented; otherwise false. The XmlValidatingReader class returns true.

Reimplemented from System::Xml::XmlReader.

◆ get_CanResolveEntity()

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::get_CanResolveEntity ( )
overridevirtual

Returns a value indicating whether this reader can parse and resolve entities.

Returns
true if the reader can parse and resolve entities; otherwise, false. XmlValidatingReader always returns true.

Reimplemented from System::Xml::XmlReader.

◆ get_Depth()

ASPOSECPP_SHARED_API int32_t System::Xml::XmlValidatingReader::get_Depth ( )
overridevirtual

Returns the depth of the current node in the XML document.

Returns
The depth of the current node in the XML document.

Implements System::Xml::XmlReader.

◆ get_Encoding()

ASPOSECPP_SHARED_API SharedPtr<System::Text::Encoding> System::Xml::XmlValidatingReader::get_Encoding ( )

Returns the encoding attribute for the document.

Returns
The encoding value. If no encoding attribute exists, and there is not byte-order mark, this defaults to UTF-8.

◆ get_EntityHandling()

ASPOSECPP_SHARED_API System::Xml::EntityHandling System::Xml::XmlValidatingReader::get_EntityHandling ( )

Returns a value that specifies how the reader handles entities.

Returns
One of the EntityHandling values. If no EntityHandling is specified, it defaults to EntityHandling::ExpandEntities.

◆ get_EOF()

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::get_EOF ( )
overridevirtual

Returns a value indicating whether the reader is positioned at the end of the stream.

Returns
true if the reader is positioned at the end of the stream; otherwise, false.

Implements System::Xml::XmlReader.

◆ get_HasValue()

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::get_HasValue ( )
overridevirtual

Returns a value indicating whether the current node can have a XmlValidatingReader::get_Value other than String::Empty.

Returns
true if the node on which the reader is currently positioned can have a Value; otherwise, false.

Reimplemented from System::Xml::XmlReader.

◆ get_IsDefault()

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::get_IsDefault ( )
overridevirtual

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.

Returns
true if the current node is an attribute whose value was generated from the default value defined in the DTD or schema; false if the attribute value was explicitly set.

Reimplemented from System::Xml::XmlReader.

◆ get_IsEmptyElement()

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::get_IsEmptyElement ( )
overridevirtual

Returns a value indicating whether the current node is an empty element (for example, <MyElement/>).

Returns
true if the current node is an element (XmlValidatingReader::get_NodeType value equals XmlNodeType::Element) that ends with />; otherwise, false.

Implements System::Xml::XmlReader.

◆ get_LineNumber()

ASPOSECPP_SHARED_API int32_t System::Xml::XmlValidatingReader::get_LineNumber ( )
overridevirtual

Returns the current line number.

Returns
The current line number. The starting value is 1.

Implements System::Xml::IXmlLineInfo.

◆ get_LinePosition()

ASPOSECPP_SHARED_API int32_t System::Xml::XmlValidatingReader::get_LinePosition ( )
overridevirtual

Returns the current line position.

Returns
The current line position. The starting value is 1.

Implements System::Xml::IXmlLineInfo.

◆ get_LocalName()

ASPOSECPP_SHARED_API String System::Xml::XmlValidatingReader::get_LocalName ( )
overridevirtual

Returns the local name of the current node.

Returns
The name of the current node with the prefix removed. For example, LocalName is book for the element <bk:book>. For node types that do not have a name (like Text, Comment, and so on), this method returns String::Empty.

Implements System::Xml::XmlReader.

◆ get_Name()

ASPOSECPP_SHARED_API String System::Xml::XmlValidatingReader::get_Name ( )
overridevirtual

Returns the qualified name of the current node.

Returns
The qualified name of the current node. For example, Name is bk:book for the element <bk:book>.

The name returned is dependent on the XmlValidatingReader::NodeType of the node. The following node types return the listed values. All other node types return an empty string.

Node Type Name
AttributeThe name of the attribute.
DocumentTypeThe document type name.
ElementThe tag name.
EntityReferenceThe name of the entity referenced.
ProcessingInstructionThe target of the processing instruction.
XmlDeclarationThe literal string xml.

Reimplemented from System::Xml::XmlReader.

◆ get_Namespaces()

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::get_Namespaces ( )

Returns a value indicating whether to do namespace support.

Returns
true to do namespace support; otherwise, false. The default is true.

◆ get_NamespaceURI()

ASPOSECPP_SHARED_API String System::Xml::XmlValidatingReader::get_NamespaceURI ( )
overridevirtual

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.

Returns
The namespace URI of the current node; otherwise an empty string.

Implements System::Xml::XmlReader.

◆ get_NameTable()

ASPOSECPP_SHARED_API SharedPtr<XmlNameTable> System::Xml::XmlValidatingReader::get_NameTable ( )
overridevirtual

Returns the XmlNameTable associated with this implementation.

Returns
XmlNameTable that enables you to get the atomized version of a string within the node.

Implements System::Xml::XmlReader.

◆ get_NodeType()

ASPOSECPP_SHARED_API XmlNodeType System::Xml::XmlValidatingReader::get_NodeType ( )
overridevirtual

Returns the type of the current node.

Returns
One of the XmlNodeType values representing the type of the current node.

Implements System::Xml::XmlReader.

◆ get_Prefix()

ASPOSECPP_SHARED_API String System::Xml::XmlValidatingReader::get_Prefix ( )
overridevirtual

Returns the namespace prefix associated with the current node.

Returns
The namespace prefix associated with the current node.

Implements System::Xml::XmlReader.

◆ get_QuoteChar()

ASPOSECPP_SHARED_API char16_t System::Xml::XmlValidatingReader::get_QuoteChar ( )
overridevirtual

Returns the quotation mark character used to enclose the value of an attribute node.

Returns
The quotation mark character (" or ') used to enclose the value of an attribute node.

Reimplemented from System::Xml::XmlReader.

◆ get_Reader()

ASPOSECPP_SHARED_API SharedPtr<XmlReader> System::Xml::XmlValidatingReader::get_Reader ( )

Returns the XmlReader used to construct this XmlValidatingReader.

Returns
The XmlReader specified in the constructor.

◆ get_ReadState()

ASPOSECPP_SHARED_API System::Xml::ReadState System::Xml::XmlValidatingReader::get_ReadState ( )
overridevirtual

Returns the state of the reader.

Returns
One of the ReadState values.

Implements System::Xml::XmlReader.

◆ get_Schemas()

ASPOSECPP_SHARED_API SharedPtr<Schema::XmlSchemaCollection> System::Xml::XmlValidatingReader::get_Schemas ( )

Returns a XmlSchemaCollection to use for validation.

Returns
The XmlSchemaCollection to use for validation.

◆ get_SchemaType()

ASPOSECPP_SHARED_API SharedPtr<Object> System::Xml::XmlValidatingReader::get_SchemaType ( )

Returns a schema type object.

Returns
XmlSchemaDatatype, XmlSchemaSimpleType, or XmlSchemaComplexType depending whether the node value is a built in XML Schema definition language (XSD) type or a user defined simpleType or complexType; nullptr if the current node has no schema type.

◆ get_ValidationType()

ASPOSECPP_SHARED_API System::Xml::ValidationType System::Xml::XmlValidatingReader::get_ValidationType ( )

Returns a value indicating the type of validation to perform.

Returns
One of the ValidationType values. If this value is not set, it defaults to ValidationType::Auto.

◆ get_Value()

ASPOSECPP_SHARED_API String System::Xml::XmlValidatingReader::get_Value ( )
overridevirtual

Returns the text value of the current node.

Returns
The value returned depends on the XmlValidatingReader::NodeType of the node.

The following table lists node types that have a value to return. All other node types return String::Empty.

Node Type Value
AttributeThe value of the attribute.
CDATAThe content of the CDATA section.
CommentThe content of the comment.
DocumentTypeThe internal subset.
ProcessingInstructionThe entire content, excluding the target.
SignificantWhitespaceThe white space between markup in a mixed content model.
TextThe content of the text node.
WhitespaceThe white space between markup.
XmlDeclarationThe content of the declaration.

Implements System::Xml::XmlReader.

◆ get_XmlLang()

ASPOSECPP_SHARED_API String System::Xml::XmlValidatingReader::get_XmlLang ( )
overridevirtual

Returns the current xml:lang scope.

Returns
The current xml:lang scope.

Reimplemented from System::Xml::XmlReader.

◆ get_XmlSpace()

ASPOSECPP_SHARED_API System::Xml::XmlSpace System::Xml::XmlValidatingReader::get_XmlSpace ( )
overridevirtual

Returns the current xml:space scope.

Returns
One of the XmlSpace values. If no xml:space scope exists, this value defaults to XmlSpace::None.

Reimplemented from System::Xml::XmlReader.

◆ GetAttribute() [1/3]

ASPOSECPP_SHARED_API String System::Xml::XmlValidatingReader::GetAttribute ( String  name)
overridevirtual

Returns the value of the attribute with the specified name.

Parameters
nameThe qualified name of the attribute.
Returns
The value of the specified attribute. If the attribute is not found, nullptr is returned.

Implements System::Xml::XmlReader.

◆ GetAttribute() [2/3]

ASPOSECPP_SHARED_API String System::Xml::XmlValidatingReader::GetAttribute ( String  localName,
String  namespaceURI 
)
overridevirtual

Returns the value of the attribute with the specified local name and namespace Uniform Resource Identifier (URI).

Parameters
localNameThe local name of the attribute.
namespaceURIThe namespace URI of the attribute.
Returns
The value of the specified attribute. If the attribute is not found, nullptr is returned. This method does not move the reader.

Implements System::Xml::XmlReader.

◆ GetAttribute() [3/3]

ASPOSECPP_SHARED_API String System::Xml::XmlValidatingReader::GetAttribute ( int32_t  i)
overridevirtual

Returns the value of the attribute with the specified index.

Parameters
iThe index of the attribute. The index is zero-based. (The first attribute has index 0.)
Returns
The value of the specified attribute.
Exceptions
ArgumentOutOfRangeExceptionThe i parameter is less than 0 or greater than or equal to XmlValidatingReader::get_AttributeCount value.

Implements System::Xml::XmlReader.

◆ HasLineInfo()

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::HasLineInfo ( )
overridevirtual

Returns a value indicating whether the class can return line information.

Returns
true if the class can return line information; otherwise, false.

Implements System::Xml::IXmlLineInfo.

◆ LookupNamespace()

ASPOSECPP_SHARED_API String System::Xml::XmlValidatingReader::LookupNamespace ( const String prefix)
overridevirtual

Resolves a namespace prefix in the current element's scope.

Parameters
prefixThe prefix whose namespace Uniform Resource Identifier (URI) you want to resolve. To match the default namespace, pass an empty string.
Returns
The namespace URI to which the prefix maps or nullptr if no matching prefix is found.

Implements System::Xml::IXmlNamespaceResolver.

◆ MoveToAttribute() [1/3]

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::MoveToAttribute ( String  name)
overridevirtual

Moves to the attribute with the specified name.

Parameters
nameThe qualified name of the attribute.
Returns
true if the attribute is found; otherwise, false. If false, the position of the reader does not change.

Implements System::Xml::XmlReader.

◆ MoveToAttribute() [2/3]

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::MoveToAttribute ( String  localName,
String  namespaceURI 
)
overridevirtual

Moves to the attribute with the specified local name and namespace Uniform Resource Identifier (URI).

Parameters
localNameThe local name of the attribute.
namespaceURIThe namespace URI of the attribute.
Returns
true if the attribute is found; otherwise, false. If false, the position of the reader does not change.

Implements System::Xml::XmlReader.

◆ MoveToAttribute() [3/3]

ASPOSECPP_SHARED_API void System::Xml::XmlValidatingReader::MoveToAttribute ( int32_t  i)
overridevirtual

Moves to the attribute with the specified index.

Parameters
iThe index of the attribute.
Exceptions
ArgumentOutOfRangeExceptionThe i parameter is less than 0 or greater than or equal to XmlReader::get_AttributeCount value.

Reimplemented from System::Xml::XmlReader.

◆ MoveToElement()

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::MoveToElement ( )
overridevirtual

Moves to the element that contains the current attribute node.

Returns
true if the reader is positioned on an attribute (the reader moves to the element that owns the attribute); false if the reader is not positioned on an attribute (the position of the reader does not change).

Implements System::Xml::XmlReader.

◆ MoveToFirstAttribute()

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::MoveToFirstAttribute ( )
overridevirtual

Moves to the first attribute.

Returns
true if an attribute exists (the reader moves to the first attribute); otherwise, false (the position of the reader does not change).

Implements System::Xml::XmlReader.

◆ MoveToNextAttribute()

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::MoveToNextAttribute ( )
overridevirtual

Moves to the next attribute.

Returns
true if there is a next attribute; false if there are no more attributes.

Implements System::Xml::XmlReader.

◆ Read()

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::Read ( )
overridevirtual

Reads the next node from the stream.

Returns
true if the next node was read successfully; false if there are no more nodes to read.

Implements System::Xml::XmlReader.

◆ ReadAttributeValue()

ASPOSECPP_SHARED_API bool System::Xml::XmlValidatingReader::ReadAttributeValue ( )
overridevirtual

Parses the attribute value into one or more Text, EntityReference, or EndEntity nodes.

Returns
true if there are nodes to return. false if the reader is not positioned on an attribute node when the initial call is made or if all the attribute values have been read. An empty attribute, such as, misc="", returns true with a single node with a value of String::Empty.

Implements System::Xml::XmlReader.

◆ ReadContentAsBase64()

ASPOSECPP_SHARED_API int32_t System::Xml::XmlValidatingReader::ReadContentAsBase64 ( ArrayPtr< uint8_t >  buffer,
int32_t  index,
int32_t  count 
)
overridevirtual

Reads the content and returns the Base64 decoded binary bytes.

Parameters
bufferThe buffer into which to copy the resulting text. This value cannot be nullptr.
indexThe offset into the buffer where to start copying the result.
countThe maximum number of bytes to copy into the buffer. The actual number of bytes copied is returned from this method.
Returns
The number of bytes written to the buffer.
Exceptions
ArgumentNullExceptionThe buffer value is nullptr.
InvalidOperationExceptionThe call is not supported on the current node.
ArgumentOutOfRangeExceptionThe index into the buffer or index + count is larger than the allocated buffer size.

Reimplemented from System::Xml::XmlReader.

◆ ReadContentAsBinHex()

ASPOSECPP_SHARED_API int32_t System::Xml::XmlValidatingReader::ReadContentAsBinHex ( ArrayPtr< uint8_t >  buffer,
int32_t  index,
int32_t  count 
)
overridevirtual

Reads the content and returns the BinHex decoded binary bytes.

Parameters
bufferThe buffer into which to copy the resulting text. This value cannot be nullptr.
indexThe offset into the buffer where to start copying the result.
countThe maximum number of bytes to copy into the buffer. The actual number of bytes copied is returned from this method.
Returns
The number of bytes written to the buffer.
Exceptions
ArgumentNullExceptionThe buffer value is nullptr.
InvalidOperationExceptionThe call is not supported on the current node.
ArgumentOutOfRangeExceptionThe index into the buffer or index + count is larger than the allocated buffer size.
NotSupportedExceptionThe XmlValidatingReader implementation does not support this method.

Reimplemented from System::Xml::XmlReader.

◆ ReadElementContentAsBase64()

ASPOSECPP_SHARED_API int32_t System::Xml::XmlValidatingReader::ReadElementContentAsBase64 ( ArrayPtr< uint8_t >  buffer,
int32_t  index,
int32_t  count 
)
overridevirtual

Reads the element and decodes the Base64 content.

Parameters
bufferThe buffer into which to copy the resulting text. This value cannot be nullptr.
indexThe offset into the buffer where to start copying the result.
countThe maximum number of bytes to copy into the buffer. The actual number of bytes copied is returned from this method.
Returns
The number of bytes written to the buffer.
Exceptions
ArgumentNullExceptionThe buffer value is nullptr.
InvalidOperationExceptionThe current node is not an element node.
ArgumentOutOfRangeExceptionThe index into the buffer or index + count is larger than the allocated buffer size.
NotSupportedExceptionThe XmlValidatingReader implementation does not support this method.
XmlExceptionThe element contains mixed-content.
FormatExceptionThe content cannot be converted to the requested type.

Reimplemented from System::Xml::XmlReader.

◆ ReadElementContentAsBinHex()

ASPOSECPP_SHARED_API int32_t System::Xml::XmlValidatingReader::ReadElementContentAsBinHex ( ArrayPtr< uint8_t >  buffer,
int32_t  index,
int32_t  count 
)
overridevirtual

Reads the element and decodes the BinHex content.

Parameters
bufferThe buffer into which to copy the resulting text. This value cannot be nullptr.
indexThe offset into the buffer where to start copying the result.
countThe maximum number of bytes to copy into the buffer. The actual number of bytes copied is returned from this method.
Returns
The number of bytes written to the buffer.
Exceptions
ArgumentNullExceptionThe buffer value is nullptr.
InvalidOperationExceptionThe current node is not an element node.
ArgumentOutOfRangeExceptionThe index into the buffer or index + count is larger than the allocated buffer size.
NotSupportedExceptionThe XmlValidatingReader implementation does not support this method.
XmlExceptionThe element contains mixed-content.
FormatExceptionThe content cannot be converted to the requested type.

Reimplemented from System::Xml::XmlReader.

◆ ReadString()

ASPOSECPP_SHARED_API String System::Xml::XmlValidatingReader::ReadString ( )
overridevirtual

Reads the contents of an element or text node as a string.

Returns
The contents of the element or text node. This can be an empty string if the reader is positioned on something other than an element or text node, or if there is no more text content to return in the current context.

Reimplemented from System::Xml::XmlReader.

◆ ReadTypedValue()

ASPOSECPP_SHARED_API SharedPtr<Object> System::Xml::XmlValidatingReader::ReadTypedValue ( )

Returns the runt-ime type for the specified XML Schema definition language (XSD) type.

Returns
The run-time type for the specified XML Schema type.

◆ ResolveEntity()

ASPOSECPP_SHARED_API void System::Xml::XmlValidatingReader::ResolveEntity ( )
overridevirtual

Resolves the entity reference for EntityReference nodes.

Exceptions
InvalidOperationExceptionThe reader is not positioned on an EntityReference node.

Implements System::Xml::XmlReader.

◆ set_EntityHandling()

ASPOSECPP_SHARED_API void System::Xml::XmlValidatingReader::set_EntityHandling ( System::Xml::EntityHandling  value)

Sets a value that specifies how the reader handles entities.

Parameters
valueThe value to set.
Exceptions
ArgumentOutOfRangeExceptionInvalid value was specified.

◆ set_Namespaces()

ASPOSECPP_SHARED_API void System::Xml::XmlValidatingReader::set_Namespaces ( bool  value)

Sets a value indicating whether to do namespace support.

Parameters
valueThe value to set.

◆ set_ValidationType()

ASPOSECPP_SHARED_API void System::Xml::XmlValidatingReader::set_ValidationType ( System::Xml::ValidationType  value)

Sets a value indicating the type of validation to perform.

Parameters
valueThe value to set.
Exceptions
InvalidOperationExceptionSetting the value after a Read has been called.

◆ set_XmlResolver()

ASPOSECPP_SHARED_API void System::Xml::XmlValidatingReader::set_XmlResolver ( const SharedPtr< System::Xml::XmlResolver > &  value)

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.

Parameters
valueThe value to set.

◆ ValidationEventHandler_add()

template<class... Args>
void System::Xml::XmlValidatingReader::ValidationEventHandler_add ( Args...  value)
inline

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.

Parameters
valueA bound or static method or ValidationEventHandler instance.

◆ ValidationEventHandler_remove()

template<class... Args>
void System::Xml::XmlValidatingReader::ValidationEventHandler_remove ( Args...  value)
inline

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.

Parameters
valueA bound or static method or ValidationEventHandler instance.