System::Xml::XmlTextReader Class Reference

Represents a reader that provides fast, non-cached, forward-only access to XML data. More...

#include "xml_text_reader.h"

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

Public Types

using Ptr = SharedPtr< XmlTextReader >
 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
 Returns the type of the current node. More...
 
ASPOSECPP_SHARED_API String get_Name () override
 Returns the qualified name of the current node. More...
 
ASPOSECPP_SHARED_API String get_LocalName () override
 Returns the local name of the current node. More...
 
ASPOSECPP_SHARED_API String get_NamespaceURI () override
 Returns the namespace URI (as defined in the W3C Namespace specification) of the node on which the reader is positioned. More...
 
ASPOSECPP_SHARED_API String get_Prefix () override
 Returns the namespace prefix associated with the current node. More...
 
ASPOSECPP_SHARED_API bool get_HasValue () override
 Returns a value indicating whether the current node can have a XmlTextReader::get_Value other than String::Empty. More...
 
ASPOSECPP_SHARED_API String get_Value () override
 Returns the text value of the current node. More...
 
ASPOSECPP_SHARED_API int32_t get_Depth () override
 Returns the depth of the current node in the XML document. More...
 
ASPOSECPP_SHARED_API String get_BaseURI () override
 Returns the base URI of the current node. More...
 
ASPOSECPP_SHARED_API bool get_IsEmptyElement () override
 Returns a value indicating whether the current node is an empty element (for example, <MyElement/>). More...
 
ASPOSECPP_SHARED_API 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 DTD or schema. More...
 
ASPOSECPP_SHARED_API char16_t get_QuoteChar () override
 Returns the quotation mark character used to enclose the value of an attribute node. More...
 
ASPOSECPP_SHARED_API System::Xml::XmlSpace get_XmlSpace () override
 Returns the current xml:space scope. More...
 
ASPOSECPP_SHARED_API String get_XmlLang () override
 Returns the current xml:lang scope. More...
 
ASPOSECPP_SHARED_API int32_t get_AttributeCount () override
 Returns the number of attributes on the current node. More...
 
ASPOSECPP_SHARED_API bool get_EOF () override
 Returns a value indicating whether the reader is positioned at the end of the stream. More...
 
ASPOSECPP_SHARED_API System::Xml::ReadState get_ReadState () override
 Returns the state of the reader. More...
 
ASPOSECPP_SHARED_API SharedPtr< XmlNameTableget_NameTable () override
 Returns the XmlNameTable associated with this implementation. More...
 
ASPOSECPP_SHARED_API bool get_CanResolveEntity () override
 Returns a value indicating whether this reader can parse and resolve entities. More...
 
ASPOSECPP_SHARED_API bool get_CanReadBinaryContent () override
 Returns a value indicating whether the XmlTextReader implements the binary content read methods. More...
 
ASPOSECPP_SHARED_API bool get_CanReadValueChunk () override
 Returns a value indicating whether the XmlTextReader implements the XmlReader::ReadValueChunk method. More...
 
ASPOSECPP_SHARED_API int32_t get_LineNumber () override
 Returns the current line number. More...
 
ASPOSECPP_SHARED_API int32_t get_LinePosition () override
 Returns the current line position. More...
 
ASPOSECPP_SHARED_API bool get_Namespaces ()
 Returns a value indicating whether to do namespace support. More...
 
ASPOSECPP_SHARED_API void set_Namespaces (bool value)
 Sets a value indicating whether to do namespace support. More...
 
ASPOSECPP_SHARED_API bool get_Normalization ()
 Returns a value indicating whether to normalize white space and attribute values. More...
 
ASPOSECPP_SHARED_API void set_Normalization (bool value)
 Sets a value indicating whether to normalize white space and attribute values. More...
 
ASPOSECPP_SHARED_API SharedPtr< System::Text::Encodingget_Encoding ()
 Returns the encoding of the document. More...
 
ASPOSECPP_SHARED_API System::Xml::WhitespaceHandling get_WhitespaceHandling ()
 Returns a value that specifies how white space is handled. More...
 
ASPOSECPP_SHARED_API void set_WhitespaceHandling (System::Xml::WhitespaceHandling value)
 Sets a value that specifies how white space is handled. More...
 
ASPOSECPP_SHARED_API bool get_ProhibitDtd ()
 Returns a value indicating whether to allow DTD processing. More...
 
ASPOSECPP_SHARED_API void set_ProhibitDtd (bool value)
 Sets a value indicating whether to allow DTD processing. More...
 
ASPOSECPP_SHARED_API System::Xml::DtdProcessing get_DtdProcessing ()
 Returns the DtdProcessing enumeration. More...
 
ASPOSECPP_SHARED_API void set_DtdProcessing (System::Xml::DtdProcessing value)
 Sets the DtdProcessing enumeration. More...
 
ASPOSECPP_SHARED_API System::Xml::EntityHandling get_EntityHandling ()
 Returns a value that specifies how the reader handles entities. More...
 
ASPOSECPP_SHARED_API void set_EntityHandling (System::Xml::EntityHandling value)
 Sets a value that specifies how the reader handles entities. More...
 
ASPOSECPP_SHARED_API void set_XmlResolver (const SharedPtr< System::Xml::XmlResolver > &value)
 Sets the XmlResolver used for resolving DTD references. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const SharedPtr< IO::Stream > &input)
 Initializes a new instance of the XmlTextReader class with the specified stream. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const String &url, const SharedPtr< IO::Stream > &input)
 Initializes a new instance of the XmlTextReader class with the specified URL and stream. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const SharedPtr< IO::Stream > &input, const SharedPtr< XmlNameTable > &nt)
 Initializes a new instance of the XmlTextReader class with the specified stream and XmlNameTable. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const String &url, const SharedPtr< IO::Stream > &input, const SharedPtr< XmlNameTable > &nt)
 Initializes a new instance of the XmlTextReader class with the specified URL, stream and XmlNameTable. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const SharedPtr< IO::TextReader > &input)
 Initializes a new instance of the XmlTextReader class with the specified TextReader. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const String &url, const SharedPtr< IO::TextReader > &input)
 Initializes a new instance of the XmlTextReader class with the specified URL and TextReader. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const SharedPtr< IO::TextReader > &input, const SharedPtr< XmlNameTable > &nt)
 Initializes a new instance of the XmlTextReader class with the specified TextReader and XmlNameTable. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const String &url, const SharedPtr< IO::TextReader > &input, const SharedPtr< XmlNameTable > &nt)
 Initializes a new instance of the XmlTextReader class with the specified URL, TextReader and XmlNameTable. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const SharedPtr< IO::Stream > &xmlFragment, XmlNodeType fragType, const SharedPtr< XmlParserContext > &context)
 Initializes a new instance of the XmlTextReader class with the specified stream, XmlNodeType, and XmlParserContext. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const String &xmlFragment, XmlNodeType fragType, const SharedPtr< XmlParserContext > &context)
 Initializes a new instance of the XmlTextReader class with the specified string, XmlNodeType, and XmlParserContext. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const String &url)
 Initializes a new instance of the XmlTextReader class with the specified file. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const String &url, const SharedPtr< XmlNameTable > &nt)
 Initializes a new instance of the XmlTextReader class with the specified file and XmlNameTable. More...
 
ASPOSECPP_SHARED_API String GetAttribute (String name) override
 Returns the value of the attribute with the specified name. More...
 
ASPOSECPP_SHARED_API String GetAttribute (String localName, String namespaceURI) override
 Returns the value of the attribute with the specified local name and namespace URI. More...
 
ASPOSECPP_SHARED_API String GetAttribute (int32_t i) override
 Returns the value of the attribute with the specified index. More...
 
ASPOSECPP_SHARED_API bool MoveToAttribute (String name) override
 Moves to the attribute with the specified name. More...
 
ASPOSECPP_SHARED_API bool MoveToAttribute (String localName, String namespaceURI) override
 Moves to the attribute with the specified local name and namespace URI. More...
 
ASPOSECPP_SHARED_API void MoveToAttribute (int32_t i) override
 Moves to the attribute with the specified index. More...
 
ASPOSECPP_SHARED_API bool MoveToFirstAttribute () override
 Moves to the first attribute. More...
 
ASPOSECPP_SHARED_API bool MoveToNextAttribute () override
 Moves to the next attribute. More...
 
ASPOSECPP_SHARED_API bool MoveToElement () override
 Moves to the element that contains the current attribute node. More...
 
ASPOSECPP_SHARED_API bool ReadAttributeValue () override
 Parses the attribute value into one or more Text, EntityReference, or EndEntity nodes. More...
 
ASPOSECPP_SHARED_API bool Read () override
 Reads the next node from the stream. More...
 
ASPOSECPP_SHARED_API void Close () override
 Changes the XmlReader::get_ReadState to Closed. More...
 
ASPOSECPP_SHARED_API void Skip () override
 Skips the children of the current node. More...
 
ASPOSECPP_SHARED_API String LookupNamespace (const String &prefix) override
 Resolves a namespace prefix in the current element's scope. More...
 
ASPOSECPP_SHARED_API void ResolveEntity () override
 Resolves the entity reference for EntityReference nodes. More...
 
ASPOSECPP_SHARED_API int32_t ReadContentAsBase64 (ArrayPtr< uint8_t > buffer, int32_t index, int32_t count) override
 Reads the content and returns the Base64 decoded binary bytes. More...
 
ASPOSECPP_SHARED_API int32_t ReadElementContentAsBase64 (ArrayPtr< uint8_t > buffer, int32_t index, int32_t count) override
 Reads the element and decodes the Base64 content. More...
 
ASPOSECPP_SHARED_API int32_t ReadContentAsBinHex (ArrayPtr< uint8_t > buffer, int32_t index, int32_t count) override
 Reads the content and returns the BinHex decoded binary bytes. More...
 
ASPOSECPP_SHARED_API int32_t ReadElementContentAsBinHex (ArrayPtr< uint8_t > buffer, int32_t index, int32_t count) override
 Reads the element and decodes the BinHex content. More...
 
ASPOSECPP_SHARED_API String ReadString () override
 Reads the contents of an element or a text node as a string. More...
 
ASPOSECPP_SHARED_API bool HasLineInfo () override
 Returns a value indicating whether the class can return line information. More...
 
ASPOSECPP_SHARED_API SharedPtr< Collections::Generic::IDictionary< String, String > > GetNamespacesInScope (XmlNamespaceScope scope) override
 Returns a collection that contains all namespaces currently in-scope. More...
 
ASPOSECPP_SHARED_API void ResetState ()
 Resets the state of the reader to ReadState::Initial. More...
 
ASPOSECPP_SHARED_API SharedPtr< IO::TextReaderGetRemainder ()
 Returns the remainder of the buffered XML. More...
 
ASPOSECPP_SHARED_API int32_t ReadChars (const ArrayPtr< char16_t > &buffer, int32_t index, int32_t count)
 Reads the text contents of an element into a character buffer. This method is designed to read large streams of embedded text by calling it successively. More...
 
ASPOSECPP_SHARED_API int32_t ReadBase64 (const ArrayPtr< uint8_t > &array, int32_t offset, int32_t len)
 Decodes Base64 and returns the decoded binary bytes. More...
 
ASPOSECPP_SHARED_API int32_t ReadBinHex (const ArrayPtr< uint8_t > &array, int32_t offset, int32_t len)
 Decodes BinHex and returns the decoded binary bytes. More...
 
- Public Member Functions inherited from System::Xml::XmlReader
virtual ASPOSECPP_SHARED_API SharedPtr< XmlReaderSettingsget_Settings ()
 Returns the XmlReaderSettings object used to create this XmlReader instance. More...
 
virtual ASPOSECPP_SHARED_API SharedPtr< Schema::IXmlSchemaInfoget_SchemaInfo ()
 Returns the schema information that has been assigned to the current node as a result of schema validation. More...
 
virtual ASPOSECPP_SHARED_API TypeInfo get_ValueType ()
 Returns The type for the current node. More...
 
virtual ASPOSECPP_SHARED_API bool get_HasAttributes ()
 Returns a value indicating whether the current node has any attributes. More...
 
virtual ASPOSECPP_SHARED_API SharedPtr< ObjectReadContentAsObject ()
 Reads the text content at the current position as an Object. More...
 
virtual ASPOSECPP_SHARED_API bool ReadContentAsBoolean ()
 Reads the text content at the current position as a Boolean. More...
 
virtual ASPOSECPP_SHARED_API DateTime ReadContentAsDateTime ()
 Reads the text content at the current position as a DateTime object. More...
 
virtual ASPOSECPP_SHARED_API DateTimeOffset ReadContentAsDateTimeOffset ()
 Reads the text content at the current position as a DateTimeOffset object. More...
 
virtual ASPOSECPP_SHARED_API double ReadContentAsDouble ()
 Reads the text content at the current position as a double-precision floating-point number. More...
 
virtual ASPOSECPP_SHARED_API float ReadContentAsFloat ()
 Reads the text content at the current position as a single-precision floating point number. More...
 
virtual ASPOSECPP_SHARED_API Decimal ReadContentAsDecimal ()
 Reads the text content at the current position as a Decimal object. More...
 
virtual ASPOSECPP_SHARED_API int32_t ReadContentAsInt ()
 Reads the text content at the current position as a 32-bit signed integer. More...
 
virtual ASPOSECPP_SHARED_API int64_t ReadContentAsLong ()
 Reads the text content at the current position as a 64-bit signed integer. More...
 
virtual ASPOSECPP_SHARED_API String ReadContentAsString ()
 Reads the text content at the current position as a String object. More...
 
virtual ASPOSECPP_SHARED_API SharedPtr< ObjectReadContentAs (const TypeInfo &returnType, SharedPtr< IXmlNamespaceResolver > namespaceResolver)
 Reads the content as an object of the type specified. More...
 
virtual ASPOSECPP_SHARED_API SharedPtr< ObjectReadElementContentAsObject ()
 Reads the current element and returns the contents as an Object. More...
 
virtual ASPOSECPP_SHARED_API SharedPtr< ObjectReadElementContentAsObject (String localName, String namespaceURI)
 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. More...
 
virtual ASPOSECPP_SHARED_API bool ReadElementContentAsBoolean ()
 Reads the current element and returns the contents as a Boolean object. More...
 
virtual ASPOSECPP_SHARED_API bool ReadElementContentAsBoolean (String localName, String namespaceURI)
 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. More...
 
virtual ASPOSECPP_SHARED_API DateTime ReadElementContentAsDateTime ()
 Reads the current element and returns the contents as a DateTime object. More...
 
virtual ASPOSECPP_SHARED_API DateTime ReadElementContentAsDateTime (String localName, String namespaceURI)
 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. More...
 
virtual ASPOSECPP_SHARED_API double ReadElementContentAsDouble ()
 Reads the current element and returns the contents as a double-precision floating-point number. More...
 
virtual ASPOSECPP_SHARED_API double ReadElementContentAsDouble (String localName, String namespaceURI)
 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. More...
 
virtual ASPOSECPP_SHARED_API float ReadElementContentAsFloat ()
 Reads the current element and returns the contents as single-precision floating-point number. More...
 
virtual ASPOSECPP_SHARED_API float ReadElementContentAsFloat (String localName, String namespaceURI)
 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. More...
 
virtual ASPOSECPP_SHARED_API Decimal ReadElementContentAsDecimal ()
 Reads the current element and returns the contents as a Decimal object. More...
 
virtual ASPOSECPP_SHARED_API Decimal ReadElementContentAsDecimal (String localName, String namespaceURI)
 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. More...
 
virtual ASPOSECPP_SHARED_API int32_t ReadElementContentAsInt ()
 Reads the current element and returns the contents as a 32-bit signed integer. More...
 
virtual ASPOSECPP_SHARED_API int32_t ReadElementContentAsInt (String localName, String namespaceURI)
 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. More...
 
virtual ASPOSECPP_SHARED_API int64_t ReadElementContentAsLong ()
 Reads the current element and returns the contents as a 64-bit signed integer. More...
 
virtual ASPOSECPP_SHARED_API int64_t ReadElementContentAsLong (String localName, String namespaceURI)
 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. More...
 
virtual ASPOSECPP_SHARED_API String ReadElementContentAsString ()
 Reads the current element and returns the contents as a String object. More...
 
virtual ASPOSECPP_SHARED_API String ReadElementContentAsString (String localName, String namespaceURI)
 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. More...
 
virtual ASPOSECPP_SHARED_API SharedPtr< ObjectReadElementContentAs (const TypeInfo &returnType, SharedPtr< IXmlNamespaceResolver > namespaceResolver)
 Reads the element content as the requested type. More...
 
virtual ASPOSECPP_SHARED_API SharedPtr< ObjectReadElementContentAs (const TypeInfo &returnType, SharedPtr< IXmlNamespaceResolver > namespaceResolver, String localName, String namespaceURI)
 Checks that the specified local name and namespace URI matches that of the current element, then reads the element content as the requested type. More...
 
virtual ASPOSECPP_SHARED_API String idx_get (int32_t i)
 When overridden in a derived class, gets the value of the attribute with the specified index. More...
 
virtual ASPOSECPP_SHARED_API String idx_get (String name)
 When overridden in a derived class, gets the value of the attribute with the specified XmlReader::get_Name value. More...
 
virtual ASPOSECPP_SHARED_API String idx_get (String name, String namespaceURI)
 When overridden in a derived class, gets the value of the attribute with the specified XmlReader::get_LocalName and XmlReader::get_NamespaceURI values. More...
 
virtual ASPOSECPP_SHARED_API int32_t ReadValueChunk (ArrayPtr< char16_t > buffer, int32_t index, int32_t count)
 Reads large streams of text embedded in an XML document. More...
 
virtual ASPOSECPP_SHARED_API 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. More...
 
virtual ASPOSECPP_SHARED_API void ReadStartElement ()
 Checks that the current node is an element and advances the reader to the next node. More...
 
virtual ASPOSECPP_SHARED_API void ReadStartElement (String name)
 Checks that the current content node is an element with the given XmlReader::get_Name value and advances the reader to the next node. More...
 
virtual ASPOSECPP_SHARED_API void ReadStartElement (String localname, String ns)
 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. More...
 
virtual ASPOSECPP_SHARED_API 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. More...
 
virtual ASPOSECPP_SHARED_API String ReadElementString (String name)
 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. More...
 
virtual ASPOSECPP_SHARED_API String ReadElementString (String localname, String ns)
 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. More...
 
virtual ASPOSECPP_SHARED_API void ReadEndElement ()
 Checks that the current content node is an end tag and advances the reader to the next node. More...
 
virtual ASPOSECPP_SHARED_API bool IsStartElement ()
 Calls XmlReader::MoveToContent and tests if the current content node is a start tag or empty element tag. More...
 
virtual ASPOSECPP_SHARED_API bool IsStartElement (String name)
 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. More...
 
virtual ASPOSECPP_SHARED_API bool IsStartElement (String localname, String ns)
 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. More...
 
virtual ASPOSECPP_SHARED_API bool ReadToFollowing (String name)
 Reads until an element with the specified qualified name is found. More...
 
virtual ASPOSECPP_SHARED_API bool ReadToFollowing (String localName, String namespaceURI)
 Reads until an element with the specified local name and namespace URI is found. More...
 
virtual ASPOSECPP_SHARED_API bool ReadToDescendant (String name)
 Advances the XmlReader to the next descendant element with the specified qualified name. More...
 
virtual ASPOSECPP_SHARED_API bool ReadToDescendant (String localName, String namespaceURI)
 Advances the XmlReader to the next descendant element with the specified local name and namespace URI. More...
 
virtual ASPOSECPP_SHARED_API bool ReadToNextSibling (String name)
 Advances the XmlReader to the next sibling element with the specified qualified name. More...
 
virtual ASPOSECPP_SHARED_API bool ReadToNextSibling (String localName, String namespaceURI)
 Advances the XmlReader to the next sibling element with the specified local name and namespace URI. More...
 
virtual ASPOSECPP_SHARED_API String ReadInnerXml ()
 When overridden in a derived class, reads all the content, including markup, as a string. More...
 
virtual ASPOSECPP_SHARED_API String ReadOuterXml ()
 When overridden in a derived class, reads the content, including markup, representing this node and all its children. More...
 
virtual ASPOSECPP_SHARED_API SharedPtr< XmlReaderReadSubtree ()
 Returns a new XmlReader instance that can be used to read the current node, and all its descendants. More...
 
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)
 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. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 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. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Protected Member Functions

ASPOSECPP_SHARED_API XmlTextReader ()
 Initializes a new instance of the XmlTextReader. More...
 
ASPOSECPP_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (XmlTextReader, CODEPORTING_ARGS())
 
ASPOSECPP_SHARED_API XmlTextReader (const SharedPtr< XmlNameTable > &nt)
 Initializes a new instance of the XmlTextReader class with the specified XmlNameTable. More...
 
ASPOSECPP_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (XmlTextReader, CODEPORTING_ARGS(SharedPtr< XmlNameTable > nt))
 
virtual ASPOSECPP_SHARED_API ~XmlTextReader ()
 
- Protected Member Functions inherited from System::Xml::XmlReader
virtual ASPOSECPP_SHARED_API void Dispose (bool disposing)
 Optionally releases all resources used by the current instance of the XmlReader class. More...
 
virtual ASPOSECPP_SHARED_API ~XmlReader ()
 

Additional Inherited Members

- Static Public Member Functions inherited from System::Xml::XmlReader
static ASPOSECPP_SHARED_API bool IsName (const String &str)
 Returns a value indicating whether the string argument is a valid XML name. More...
 
static ASPOSECPP_SHARED_API bool IsNameToken (const String &str)
 Returns a value indicating whether or not the string argument is a valid XML name token. More...
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const String &inputUri)
 Creates a new XmlReader instance with specified URI. More...
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const String &inputUri, const SharedPtr< XmlReaderSettings > &settings)
 Creates a new XmlReader instance by using the specified URI and settings. More...
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const String &inputUri, SharedPtr< XmlReaderSettings > settings, const SharedPtr< XmlParserContext > &inputContext)
 Creates a new XmlReader instance by using the specified URI, settings, and context information for parsing. More...
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::Stream > &input)
 Creates a new XmlReader instance using the specified stream with default settings. More...
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::Stream > &input, const SharedPtr< XmlReaderSettings > &settings)
 Creates a new XmlReader instance with the specified stream and settings. More...
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::Stream > &input, SharedPtr< XmlReaderSettings > settings, const String &baseUri)
 Creates a new XmlReader instance using the specified stream, base URI, and settings. More...
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::Stream > &input, SharedPtr< XmlReaderSettings > settings, const SharedPtr< XmlParserContext > &inputContext)
 Creates a new XmlReader instance using the specified stream, settings, and context information for parsing. More...
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::TextReader > &input)
 Creates a new XmlReader instance by using the specified text reader. More...
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::TextReader > &input, const SharedPtr< XmlReaderSettings > &settings)
 Creates a new XmlReader instance by using the specified text reader and settings. More...
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::TextReader > &input, SharedPtr< XmlReaderSettings > settings, const String &baseUri)
 Creates a new XmlReader instance by using the specified text reader, settings, and base URI. More...
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< IO::TextReader > &input, SharedPtr< XmlReaderSettings > settings, const SharedPtr< XmlParserContext > &inputContext)
 Creates a new XmlReader instance by using the specified text reader, settings, and context information for parsing. More...
 
static ASPOSECPP_SHARED_API SharedPtr< XmlReaderCreate (const SharedPtr< XmlReader > &reader, SharedPtr< XmlReaderSettings > settings)
 Creates a new XmlReader instance by using the specified XML reader and settings. More...
 
- 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 fast, non-cached, forward-only access to XML data.

Remarks
It is recommended to use the XmlReader class instead.
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

◆ XmlTextReader() [1/14]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const SharedPtr< IO::Stream > &  input)

Initializes a new instance of the XmlTextReader class with the specified stream.

Parameters
inputThe stream containing the XML data to read.
Exceptions
ArgumentNullExceptioninput is nullptr.

◆ XmlTextReader() [2/14]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const String url,
const SharedPtr< IO::Stream > &  input 
)

Initializes a new instance of the XmlTextReader class with the specified URL and stream.

Parameters
urlThe URL to use for resolving external resources. The XmlTextReader::get_BaseURI is set to this value.
inputThe stream containing the XML data to read.
Exceptions
ArgumentNullExceptioninput is nullptr.

◆ XmlTextReader() [3/14]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const SharedPtr< IO::Stream > &  input,
const SharedPtr< XmlNameTable > &  nt 
)

Initializes a new instance of the XmlTextReader class with the specified stream and XmlNameTable.

Parameters
inputThe stream containing the XML data to read.
ntThe XmlNameTable to use.
Exceptions
NullReferenceExceptionThe input or nt value is nullptr.

◆ XmlTextReader() [4/14]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const String url,
const SharedPtr< IO::Stream > &  input,
const SharedPtr< XmlNameTable > &  nt 
)

Initializes a new instance of the XmlTextReader class with the specified URL, stream and XmlNameTable.

Parameters
urlThe URL to use for resolving external resources. The XmlTextReader::get_BaseURI is set to this value. If url is nullptr, BaseURI is set to String::Empty.
inputThe stream containing the XML data to read.
ntThe XmlNameTable to use.
Exceptions
NullReferenceExceptionThe input or nt value is nullptr.

◆ XmlTextReader() [5/14]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const SharedPtr< IO::TextReader > &  input)

Initializes a new instance of the XmlTextReader class with the specified TextReader.

Parameters
inputThe TextReader containing the XML data to read.

◆ XmlTextReader() [6/14]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const String url,
const SharedPtr< IO::TextReader > &  input 
)

Initializes a new instance of the XmlTextReader class with the specified URL and TextReader.

Parameters
urlThe URL to use for resolving external resources. The XmlTextReader::get_BaseURI is set to this value.
inputThe TextReader containing the XML data to read.

◆ XmlTextReader() [7/14]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const SharedPtr< IO::TextReader > &  input,
const SharedPtr< XmlNameTable > &  nt 
)

Initializes a new instance of the XmlTextReader class with the specified TextReader and XmlNameTable.

Parameters
inputThe TextReader containing the XML data to read.
ntThe XmlNameTable to use.
Exceptions
NullReferenceExceptionThe nt value is nullptr.

◆ XmlTextReader() [8/14]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const String url,
const SharedPtr< IO::TextReader > &  input,
const SharedPtr< XmlNameTable > &  nt 
)

Initializes a new instance of the XmlTextReader class with the specified URL, TextReader and XmlNameTable.

Parameters
urlThe URL to use for resolving external resources. The XmlTextReader::get_BaseURI is set to this value. If url is nullptr, BaseURI is set to String::Empty.
inputThe TextReader containing the XML data to read.
ntThe XmlNameTable to use.
Exceptions
ArgumentNullExceptionThe nt value is nullptr.

◆ XmlTextReader() [9/14]

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

Initializes a new instance of the XmlTextReader class with the specified stream, XmlNodeType, and XmlParserContext.

Parameters
xmlFragmentThe stream containing the XML fragment to parse.
fragTypeThe XmlNodeType of the XML fragment. This also determines what the fragment can contain.
contextThe XmlParserContext in which the xmlFragment is to be parsed. This includes the XmlNameTable to use, encoding, namespace scope, the current xml:lang, and the xml:space scope.
Exceptions
XmlExceptionfragType is not an Element, Attribute, or Document XmlNodeType::
ArgumentNullExceptionxmlFragment is nullptr.

◆ XmlTextReader() [10/14]

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

Initializes a new instance of the XmlTextReader class with the specified string, XmlNodeType, and XmlParserContext.

Parameters
xmlFragmentThe string containing the XML fragment to parse.
fragTypeThe XmlNodeType of the XML fragment. This also determines what the fragment string can contain.
contextThe XmlParserContext in which the xmlFragment is to be parsed. This includes the XmlNameTable to use, encoding, namespace scope, the current xml:lang, and the xml:space scope.
Exceptions
XmlExceptionfragType is not an Element, Attribute, or DocumentXmlNodeType.
ArgumentNullExceptionxmlFragment is nullptr.

◆ XmlTextReader() [11/14]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const String url)

Initializes a new instance of the XmlTextReader class with the specified file.

Parameters
urlThe URL for the file containing the XML data. The XmlTextReader::get_BaseURI is set to this value.
Exceptions
FileNotFoundExceptionThe specified file cannot be found.
DirectoryNotFoundExceptionPart of the filename or directory cannot be found.
InvalidOperationExceptionurl is an empty string.
WebExceptionThe remote filename cannot be resolved. An error occurred while processing the request.
UriFormatExceptionurl is not a valid URI.

◆ XmlTextReader() [12/14]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const String url,
const SharedPtr< XmlNameTable > &  nt 
)

Initializes a new instance of the XmlTextReader class with the specified file and XmlNameTable.

Parameters
urlThe URL for the file containing the XML data to read.
ntThe XmlNameTable to use.
Exceptions
NullReferenceExceptionThe nt value is nullptr.
FileNotFoundExceptionThe specified file cannot be found.
DirectoryNotFoundExceptionPart of the filename or directory cannot be found.
InvalidOperationExceptionurl is an empty string.
WebExceptionThe remote filename cannot be resolved. An error occurred while processing the request.
UriFormatExceptionurl is not a valid URI.

◆ XmlTextReader() [13/14]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( )
protected

Initializes a new instance of the XmlTextReader.

◆ XmlTextReader() [14/14]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const SharedPtr< XmlNameTable > &  nt)
protected

Initializes a new instance of the XmlTextReader class with the specified XmlNameTable.

Parameters
ntThe XmlNameTable to use.

◆ ~XmlTextReader()

virtual ASPOSECPP_SHARED_API System::Xml::XmlTextReader::~XmlTextReader ( )
protectedvirtual

Member Function Documentation

◆ Close()

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

Changes the XmlReader::get_ReadState to Closed.

Reimplemented from System::Xml::XmlReader.

◆ get_AttributeCount()

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

Returns the number of attributes on the current node.

Returns
The number of attributes on the current node.

Implements System::Xml::XmlReader.

◆ get_BaseURI()

ASPOSECPP_SHARED_API String System::Xml::XmlTextReader::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::XmlTextReader::get_CanReadBinaryContent ( )
overridevirtual

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

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

Reimplemented from System::Xml::XmlReader.

◆ get_CanReadValueChunk()

ASPOSECPP_SHARED_API bool System::Xml::XmlTextReader::get_CanReadValueChunk ( )
overridevirtual

Returns a value indicating whether the XmlTextReader implements the XmlReader::ReadValueChunk method.

Returns
true if the XmlTextReader implements the XmlReader::ReadValueChunk method; otherwise false. The XmlTextReader class always returns false.

Reimplemented from System::Xml::XmlReader.

◆ get_CanResolveEntity()

ASPOSECPP_SHARED_API bool System::Xml::XmlTextReader::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. The XmlTextReader class always returns true.

Reimplemented from System::Xml::XmlReader.

◆ get_Depth()

ASPOSECPP_SHARED_API int32_t System::Xml::XmlTextReader::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_DtdProcessing()

ASPOSECPP_SHARED_API System::Xml::DtdProcessing System::Xml::XmlTextReader::get_DtdProcessing ( )

Returns the DtdProcessing enumeration.

Returns
The DtdProcessing enumeration.

◆ get_Encoding()

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

Returns the encoding of the document.

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

◆ get_EntityHandling()

ASPOSECPP_SHARED_API System::Xml::EntityHandling System::Xml::XmlTextReader::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::ExpandCharEntities.

◆ get_EOF()

ASPOSECPP_SHARED_API bool System::Xml::XmlTextReader::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::XmlTextReader::get_HasValue ( )
overridevirtual

Returns a value indicating whether the current node can have a XmlTextReader::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::XmlTextReader::get_IsDefault ( )
overridevirtual

Returns a value indicating whether the current node is an attribute that was generated from the default value defined in the DTD or schema.

Returns
This method always returns false. (XmlTextReader does not expand default attributes.)

Reimplemented from System::Xml::XmlReader.

◆ get_IsEmptyElement()

ASPOSECPP_SHARED_API bool System::Xml::XmlTextReader::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 (XmlTextReader::get_NodeType value equals XmlNodeType::Element) that ends with />; otherwise, false.

Implements System::Xml::XmlReader.

◆ get_LineNumber()

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

Returns the current line number.

Returns
The current line number.

Implements System::Xml::IXmlLineInfo.

◆ get_LinePosition()

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

Returns the current line position.

Returns
The current line position.

Implements System::Xml::IXmlLineInfo.

◆ get_LocalName()

ASPOSECPP_SHARED_API String System::Xml::XmlTextReader::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::XmlTextReader::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 XmlTextReader::get_NodeType value 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::XmlTextReader::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::XmlTextReader::get_NamespaceURI ( )
overridevirtual

Returns the namespace URI (as defined in the 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::XmlTextReader::get_NameTable ( )
overridevirtual

Returns the XmlNameTable associated with this implementation.

Returns
The XmlNameTable enabling you to get the atomized version of a string within the node.

Implements System::Xml::XmlReader.

◆ get_NodeType()

ASPOSECPP_SHARED_API XmlNodeType System::Xml::XmlTextReader::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_Normalization()

ASPOSECPP_SHARED_API bool System::Xml::XmlTextReader::get_Normalization ( )

Returns a value indicating whether to normalize white space and attribute values.

Returns
true to normalize; otherwise, false. The default is false.

◆ get_Prefix()

ASPOSECPP_SHARED_API String System::Xml::XmlTextReader::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_ProhibitDtd()

ASPOSECPP_SHARED_API bool System::Xml::XmlTextReader::get_ProhibitDtd ( )

Returns a value indicating whether to allow DTD processing.

Deprecated:
This method is obsolete. Use XmlTextReader::get_DtdProcessing instead.
Returns
true to disallow DTD processing; otherwise false. The default is false.

◆ get_QuoteChar()

ASPOSECPP_SHARED_API char16_t System::Xml::XmlTextReader::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_ReadState()

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

Returns the state of the reader.

Returns
One of the ReadState values.

Implements System::Xml::XmlReader.

◆ get_Value()

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

Returns the text value of the current node.

Returns
The value returned depends on the XmlTextReader::get_NodeType value 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 within an xml:space='preserve' scope.
TextThe content of the text node.
WhitespaceThe white space between markup.
XmlDeclarationThe content of the declaration.

Implements System::Xml::XmlReader.

◆ get_WhitespaceHandling()

ASPOSECPP_SHARED_API System::Xml::WhitespaceHandling System::Xml::XmlTextReader::get_WhitespaceHandling ( )

Returns a value that specifies how white space is handled.

Returns
One of the WhitespaceHandling values. The default is WhitespaceHandling.All (returns Whitespace and SignificantWhitespace nodes).
Exceptions
ArgumentOutOfRangeExceptionInvalid value specified.

◆ get_XmlLang()

ASPOSECPP_SHARED_API String System::Xml::XmlTextReader::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::XmlTextReader::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::XmlTextReader::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::XmlTextReader::GetAttribute ( String  localName,
String  namespaceURI 
)
overridevirtual

Returns the value of the attribute with the specified local name and namespace 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::XmlTextReader::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 XmlTextReader::get_AttributeCount value.

Implements System::Xml::XmlReader.

◆ GetNamespacesInScope()

ASPOSECPP_SHARED_API SharedPtr<Collections::Generic::IDictionary<String, String> > System::Xml::XmlTextReader::GetNamespacesInScope ( XmlNamespaceScope  scope)
overridevirtual

Returns a collection that contains all namespaces currently in-scope.

Parameters
scopeAn XmlNamespaceScope value that specifies the type of namespace nodes to return.
Returns
An IDictionary object that contains all the current in-scope namespaces. If the reader is not positioned on an element, an empty dictionary (no namespaces) is returned.

Implements System::Xml::IXmlNamespaceResolver.

◆ GetRemainder()

ASPOSECPP_SHARED_API SharedPtr<IO::TextReader> System::Xml::XmlTextReader::GetRemainder ( )

Returns the remainder of the buffered XML.

Returns
A TextReader containing the remainder of the buffered XML.

◆ HasLineInfo()

ASPOSECPP_SHARED_API bool System::Xml::XmlTextReader::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::XmlTextReader::LookupNamespace ( const String prefix)
overridevirtual

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

Parameters
prefixThe prefix whose namespace URI you want to resolve. To match the default namespace, pass an empty string. This string does not have to be atomized.
Returns
The namespace URI to which the prefix maps or nullptr if no matching prefix is found.
Exceptions
ArgumentNullExceptionThe XmlTextReader::get_Namespaces value is set to true and the prefix value is nullptr.

Implements System::Xml::IXmlNamespaceResolver.

◆ MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION() [1/2]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION ( XmlTextReader  ,
CODEPORTING_ARGS()   
)
protected

◆ MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION() [2/2]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION ( XmlTextReader  ,
CODEPORTING_ARGS(SharedPtr< XmlNameTable > nt)   
)
protected

◆ MoveToAttribute() [1/3]

ASPOSECPP_SHARED_API bool System::Xml::XmlTextReader::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 reader's position does not change.

Implements System::Xml::XmlReader.

◆ MoveToAttribute() [2/3]

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

Moves to the attribute with the specified local name and namespace 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 reader's position does not change.

Implements System::Xml::XmlReader.

◆ MoveToAttribute() [3/3]

ASPOSECPP_SHARED_API void System::Xml::XmlTextReader::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 XmlTextReader::get_AttributeCount value.

Reimplemented from System::Xml::XmlReader.

◆ MoveToElement()

ASPOSECPP_SHARED_API bool System::Xml::XmlTextReader::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::XmlTextReader::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::XmlTextReader::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::XmlTextReader::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.
Exceptions
XmlExceptionAn error occurred while parsing the XML.

Implements System::Xml::XmlReader.

◆ ReadAttributeValue()

ASPOSECPP_SHARED_API bool System::Xml::XmlTextReader::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.

◆ ReadBase64()

ASPOSECPP_SHARED_API int32_t System::Xml::XmlTextReader::ReadBase64 ( const ArrayPtr< uint8_t > &  array,
int32_t  offset,
int32_t  len 
)

Decodes Base64 and returns the decoded binary bytes.

Parameters
arrayThe array of characters that serves as the buffer to which the text contents are written.
offsetThe zero-based index into the array specifying where the method can begin to write to the buffer.
lenThe number of bytes to write into the buffer.
Returns
The number of bytes written to the buffer.
Exceptions
XmlExceptionThe Base64 sequence is not valid.
ArgumentNullExceptionThe value of array is nullptr.
ArgumentOutOfRangeExceptionoffset < 0, or len < 0, or len > array.get_Length - offset.

◆ ReadBinHex()

ASPOSECPP_SHARED_API int32_t System::Xml::XmlTextReader::ReadBinHex ( const ArrayPtr< uint8_t > &  array,
int32_t  offset,
int32_t  len 
)

Decodes BinHex and returns the decoded binary bytes.

Parameters
arrayThe byte array that serves as the buffer to which the decoded binary bytes are written.
offsetThe zero-based index into the array specifying where the method can begin to write to the buffer.
lenThe number of bytes to write into the buffer.
Returns
The number of bytes written to your buffer.
Exceptions
XmlExceptionThe BinHex sequence is not valid.
ArgumentNullExceptionThe value of array is nullptr.
ArgumentOutOfRangeExceptionoffset < 0, or len < 0, or len > array.get_Length - offset.

◆ ReadChars()

ASPOSECPP_SHARED_API int32_t System::Xml::XmlTextReader::ReadChars ( const ArrayPtr< char16_t > &  buffer,
int32_t  index,
int32_t  count 
)

Reads the text contents of an element into a character buffer. This method is designed to read large streams of embedded text by calling it successively.

Parameters
bufferThe array of characters that serves as the buffer to which the text contents are written.
indexThe position within buffer where the method can begin writing text contents.
countThe number of characters to write into buffer.
Returns
The number of characters read. This can be 0 if the reader is not positioned on an element or if there is no more text content to return in the current context.
Exceptions
ArgumentExceptioncount is greater than the space specified in the buffer (buffer size - index).
ArgumentNullExceptionThe buffer value is nullptr.
ArgumentOutOfRangeExceptionindex < 0 or count < 0.

◆ ReadContentAsBase64()

ASPOSECPP_SHARED_API int32_t System::Xml::XmlTextReader::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 in 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::XmlTextReader::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 XmlTextReader implementation does not support this method.

Reimplemented from System::Xml::XmlReader.

◆ ReadElementContentAsBase64()

ASPOSECPP_SHARED_API int32_t System::Xml::XmlTextReader::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 XmlTextReader 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::XmlTextReader::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 XmlReader 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::XmlTextReader::ReadString ( )
overridevirtual

Reads the contents of an element or a 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. Note: The text node can be either an element or an attribute text node.
Exceptions
XmlExceptionAn error occurred while parsing the XML.
InvalidOperationExceptionAn invalid operation was attempted.

Reimplemented from System::Xml::XmlReader.

◆ ResetState()

ASPOSECPP_SHARED_API void System::Xml::XmlTextReader::ResetState ( )

Resets the state of the reader to ReadState::Initial.

Exceptions
InvalidOperationExceptionCalling ResetState if the reader was constructed using an XmlParserContext.
XmlExceptionDocuments in a single stream do not share the same encoding.

◆ ResolveEntity()

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

Resolves the entity reference for EntityReference nodes.

Implements System::Xml::XmlReader.

◆ set_DtdProcessing()

ASPOSECPP_SHARED_API void System::Xml::XmlTextReader::set_DtdProcessing ( System::Xml::DtdProcessing  value)

Sets the DtdProcessing enumeration.

Parameters
valueThe value to set.

◆ set_EntityHandling()

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

Sets a value that specifies how the reader handles entities.

Parameters
valueThe value to set.

◆ set_Namespaces()

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

Sets a value indicating whether to do namespace support.

Parameters
valueThe value to set.
Exceptions
InvalidOperationExceptionSetting this value after a read operation has occurred (XmlTextReader::get_ReadState is not ReadState::Initial).

◆ set_Normalization()

ASPOSECPP_SHARED_API void System::Xml::XmlTextReader::set_Normalization ( bool  value)

Sets a value indicating whether to normalize white space and attribute values.

Parameters
valueThe value to set.
Exceptions
InvalidOperationExceptionSetting this value when the reader is closed (XmlTextReader::get_ReadState is ReadState::Closed).

◆ set_ProhibitDtd()

ASPOSECPP_SHARED_API void System::Xml::XmlTextReader::set_ProhibitDtd ( bool  value)

Sets a value indicating whether to allow DTD processing.

Deprecated:
This method is obsolete. Use XmlTextReader::set_DtdProcessing instead.
Parameters
valueThe value to set.

◆ set_WhitespaceHandling()

ASPOSECPP_SHARED_API void System::Xml::XmlTextReader::set_WhitespaceHandling ( System::Xml::WhitespaceHandling  value)

Sets a value that specifies how white space is handled.

Parameters
valueThe value to set.
Exceptions
ArgumentOutOfRangeExceptionInvalid value specified.
InvalidOperationExceptionSetting this value when the reader is closed (XmlTextReader::get_ReadState is ReadState::Closed).

◆ set_XmlResolver()

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

Sets the XmlResolver used for resolving DTD references.

Parameters
valueThe value to set.

◆ Skip()

ASPOSECPP_SHARED_API void System::Xml::XmlTextReader::Skip ( )
overridevirtual

Skips the children of the current node.

Reimplemented from System::Xml::XmlReader.