Asposecpplib
System::Xml::XmlTextReader Class Reference

Provides non-cached forward-only access to XML data. Objects of this class should only be allocated using System::MakeObject() function. Never create instance 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. More...

Inherits System::Xml::XmlReader.

Inherited by System::Xml::XmlNodeReader.

Public Types

typedef SharedPtr< XmlTextReaderPtr
 An alias for shared pointer to an instance of this class. More...
 
- Public Types inherited from System::Xml::XmlReader
typedef SharedPtr< XmlReaderPtr
 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...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 

Public Member Functions

ASPOSECPP_SHARED_API XmlTextReader (const String &inputUri)
 Constructs an instance of the XmlTextReader class that reads XML data from the specified file. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const SharedPtr< System::IO::Stream > &input)
 Constructs an instance of the XmlTextReader class that reads XML data from the specified stream. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const SharedPtr< System::IO::TextReader > &input)
 Constructs an instance of the XmlTextReader class that reads XML data from the specified TextReader. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const String &url, const SharedPtr< System::IO::Stream > &input)
 Constructs an instance of the XmlTextReader class that reads XML data from the specified stream; a parameter specifies an URL to resolve resources. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const String &url, const SharedPtr< System::IO::TextReader > &input)
 Constructs an instance of the XmlTextReader class that reads XML data from the specified TextReader; a parameter specifies an URL to resolve resources. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const String &inputUri, const XmlReaderSettings::Ptr &settings)
 Constructs an instance of the XmlTextReader class that reads XML data from the specified file using the specified settings. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const SharedPtr< System::IO::Stream > &input, const XmlReaderSettings::Ptr &settings)
 Constructs an instance of the XmlTextReader class that reads XML data from the specified stream using the specified settings. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const SharedPtr< System::IO::TextReader > &input, const XmlReaderSettings::Ptr &settings)
 Constructs an instance of the XmlTextReader class that reads XML data from the specified TextReader using the specified settings. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const SharedPtr< System::IO::TextReader > &input, const XmlReaderSettings::Ptr &settings, const XmlParserContext::Ptr &context)
 Constructs an instance of the XmlTextReader class that reads XML data from the specified TextReader using the specified settings and context information for parsing. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const SharedPtr< System::IO::Stream > &input, XmlNodeType fragType, const XmlParserContext::Ptr &context)
 Constructs an instance of the XmlTextReader class that reads an XML fragment of the specified type from the specified stream using the specified context information for parsing. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const String &xmlFragment, XmlNodeType fragType, const XmlParserContext::Ptr &context)
 Constructs an instance of the XmTextReader class that reads an XML fragment of the specified type from the specified string using context information for parsing. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const SharedPtr< System::IO::Stream > &input, const XmlReaderSettings::Ptr &settings, const XmlParserContext::Ptr &context)
 Constructs an instance of the XmlTextReader class that reads XML data from the specified stream using the specified settings and context information for parsing. More...
 
ASPOSECPP_SHARED_API XmlTextReader (const String &xmlFragment, const XmlReaderSettings::Ptr &settings, const XmlParserContext::Ptr &context)
 Constructs an instance of the XmTextReader class that reads an XML fragment specified as a string using the specified settings and context information for parsing. More...
 
virtual ASPOSECPP_SHARED_API ~XmlTextReader ()
 Destructor. More...
 
ASPOSECPP_SHARED_API int ReadElementContentAsBase64 (const ArrayPtr< uint8_t > &buffer, int index, int count) override
 Call this methods until it returns 0 to get all the data. More...
 
ASPOSECPP_SHARED_API String get_Name () override
 Returns the qualified name of the current node. More...
 
ASPOSECPP_SHARED_API String get_Prefix () override
 Returns the prefix 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 of the current node. More...
 
ASPOSECPP_SHARED_API String get_BaseURI () override
 Returns the base URI of the current node. More...
 
ASPOSECPP_SHARED_API String get_Value () override
 Returns the value of the current node. More...
 
ASPOSECPP_SHARED_API bool get_CanResolveEntity () override
 Determines whether the current XmlReader object can parse and resolve entities. More...
 
ASPOSECPP_SHARED_API void ResolveEntity () override
 Resolves the entity reference for EntityReference nodes. More...
 
ASPOSECPP_SHARED_API ReadState get_ReadState () override
 Returns the current state of the reader. More...
 
ASPOSECPP_SHARED_API bool get_IsEmptyElement () override
 Determines if the current node is an empty element. More...
 
ASPOSECPP_SHARED_API bool get_IsDefault () override
 Determines if the current node is an attribute that was generated from the default value defined in the DTD or schema. More...
 
ASPOSECPP_SHARED_API int get_Depth () override
 Returns the depths of the current node in the XML tree. More...
 
ASPOSECPP_SHARED_API bool get_EOF () override
 Determines if the reader has reached the end of stream. More...
 
ASPOSECPP_SHARED_API bool get_HasAttributes () override
 Determines if the current node has any attributes. More...
 
ASPOSECPP_SHARED_API int get_AttributeCount () override
 Returns the number of attributes in the current node. More...
 
ASPOSECPP_SHARED_API bool get_HasValue () override
 Determines if the current node has a value. More...
 
ASPOSECPP_SHARED_API String get_XmlLang () override
 Returns the current xml:lang scope. More...
 
ASPOSECPP_SHARED_API UChar get_QuoteChar () override
 Returns the used as quotation mark character used to enclose the value of an XML attribute node. More...
 
ASPOSECPP_SHARED_API XmlNodeType get_NodeType () override
 Returns the type of the current node. More...
 
ASPOSECPP_SHARED_API String GetAttribute (const String &name) override
 Returns the value of the attribute with the specified name. More...
 
ASPOSECPP_SHARED_API String GetAttribute (const String &localName, const String &namespaceURI) override
 Returns the value of the attribute with the specified name and namespace. More...
 
ASPOSECPP_SHARED_API bool MoveToAttribute (const String &name) override
 Moves the reader's position to the attribute with the specified name. More...
 
ASPOSECPP_SHARED_API void MoveToAttribute (int index) override
 Moves the reader's position to the attribute with the specified index. More...
 
ASPOSECPP_SHARED_API bool MoveToNextAttribute () override
 Moves the reader's position to the next attribute. More...
 
ASPOSECPP_SHARED_API bool MoveToFirstAttribute () override
 Moves the reader's position to the first attribute in the list of attributes of the current node. More...
 
ASPOSECPP_SHARED_API XmlNodeType MoveToContent () override
 Moves the position of the reader to the next content node, skipping the non-content nodes. More...
 
ASPOSECPP_SHARED_API bool MoveToElement () override
 Moves the reader's position to the element node that contains the current attribute node. More...
 
ASPOSECPP_SHARED_API bool Next () override
 Reads the next node. More...
 
ASPOSECPP_SHARED_API bool Read () override
 Reads to the next node, including subtree (if any). More...
 
ASPOSECPP_SHARED_API String LookupNamespace (const String &prefix) override
 Resolves a namespace prefix in the scope of the current element. More...
 
ASPOSECPP_SHARED_API void Skip () override
 Skips the children of the current node. More...
 
ASPOSECPP_SHARED_API void Close () override
 Changes the state of the reader to ReadState::Closed. More...
 
ASPOSECPP_SHARED_API String ReadString () override
 Reads the contents of an element or a text node. More...
 
ASPOSECPP_SHARED_API void ReadStartElement () override
 Checks if the current content node is an element and moves the the reader's position to the next node. More...
 
ASPOSECPP_SHARED_API void ReadStartElement (const String &name) override
 Checks if the current content node is an element with the specified qualified name and moves the the reader's position to the next node. More...
 
ASPOSECPP_SHARED_API void ReadStartElement (const String &localName, const String &namespaceUri) override
 Checks if the current content node is an element with the specified local name and namespace URI and moves the the reader's position to the next node. More...
 
ASPOSECPP_SHARED_API String ReadInnerXml () override
 Returns a string containing all the content of the current node, including the markup, but excluding start and end tags. More...
 
ASPOSECPP_SHARED_API String ReadSubtreeInnerXml ()
 Returns a string containing all the content of the current node, including the markup, but excluding start and end tags. Unlike ReadInnerXml() it doesn't move current node. More...
 
ASPOSECPP_SHARED_API String ReadOuterXml () override
 Returns a string containing all the content of the current node, including the markup, and including start and end tags. More...
 
ASPOSECPP_SHARED_API String ReadElementString () override
 Reads the contents of a text-only element. More...
 
ASPOSECPP_SHARED_API String ReadElementString (const String &value) override
 Checks if the current node is an element whose qualified name matches the specified value and reads its content. More...
 
ASPOSECPP_SHARED_API String ReadElementString (const String &localName, const String &namespaceUri) override
 Checks if the current node is an element whose local name and namespace URI match the specified values and returns its content as string. More...
 
ASPOSECPP_SHARED_API String get_Encoding () const
 Returns the document's encoding. More...
 
ASPOSECPP_SHARED_API void set_XmlResolver (const SharedPtr< XmlResolver > &value)
 Sets the XML Resolver object used to access external XML documents. More...
 
ASPOSECPP_SHARED_API SharedPtr< XmlNameTableget_NameTable () override
 Returns the name table used by the current object. More...
 
ASPOSECPP_SHARED_API int get_LineNumber () const
 Returns the current line number. More...
 
ASPOSECPP_SHARED_API int get_LinePosition () const
 Returns the current line position. More...
 
ASPOSECPP_SHARED_API void set_ProhibitDtd (bool value)
 Sets a value that indicates if DTD processing should be prohibited. More...
 
ASPOSECPP_SHARED_API void set_EntityHandling (EntityHandling value)
 Sets a value that specifies how the reader should handle entities. More...
 
ASPOSECPP_SHARED_API void set_Normalization (bool value)
 Sets a value that indicates if the white space and attribute values should be normalized. More...
 
ASPOSECPP_SHARED_API void set_WhitespaceHandling (WhitespaceHandling value)
 Sets a value that indicates how the whitespace characters should be handled by the reader. More...
 
ASPOSECPP_SHARED_API void set_DtdProcessing (DtdProcessing value)
 Sets a value that determines the processing of DTD. More...
 
ASPOSECPP_SHARED_API int ReadBinHex (const ArrayPtr< uint8_t > &buffer, int startPosition, int length)
 Decodes a BinHex-encoded data and returns decoded bytes. More...
 
ASPOSECPP_SHARED_API SharedPtr< XmlReaderSettingsget_Settings () const override
 Returns the settings of the XmlReader. More...
 
int native_parse_flags () const
 Returns a bitwise set of flags used by the underlying libxml2 xmlTextReader object. More...
 
void RaiseLastError () override
 
- Public Member Functions inherited from System::Xml::XmlReader
ASPOSECPP_SHARED_API String idx_get (const String &name)
 Returns the value of the attribute with the specified name. More...
 
virtual ASPOSECPP_SHARED_API String GetAttribute (int32_t index)
 Returns the value of the attribute with the specified index. More...
 
virtual ASPOSECPP_SHARED_API bool ReadToNextSibling (const String &name)
 Moves the position of the reader to the next sibling with the specified name. More...
 
virtual ASPOSECPP_SHARED_API Ptr ReadSubtree ()
 Read an element and all its children, and return a new XmlReader object set to ReadState::Initial. More...
 
virtual ASPOSECPP_SHARED_API bool ReadToFollowing (const String &name)
 Reads until an element with the specified name is encountered. More...
 
virtual ASPOSECPP_SHARED_API bool ReadToFollowing (const String &localName, const String &namespaceURI)
 Reads until an element with the specified local name name and namespace URI is encountered. More...
 
virtual ASPOSECPP_SHARED_API bool ReadToDescendant (const String &name)
 Reads to the first descendant of the current element with the given name. More...
 
virtual ASPOSECPP_SHARED_API bool ReadToDescendant (const String &localName, const String &namespaceURI)
 
virtual bool ReadContentAsBoolean ()
 Reads current element's contents as boolean. More...
 
virtual double ReadContentAsDouble ()
 Reads current element's contents as double. More...
 
virtual float ReadContentAsFloat ()
 Reads current element's contents as float. More...
 
virtual Decimal ReadContentAsDecimal ()
 Reads current element's contents as decimal. More...
 
virtual int32_t ReadContentAsInt ()
 Reads current element's contents as integer. More...
 
virtual int64_t ReadContentAsLong ()
 Reads current element's contents as long integer. More...
 
virtual String ReadContentAsString ()
 Reads current element's contents as string. More...
 
virtual ASPOSECPP_SHARED_API DateTime ReadContentAsDateTime ()
 Concatenates values of textual nodes of the current content, ignoring comments and PIs, expanding entity references, and converts the content to a DateTime. Stops at start tags and end tags. More...
 
virtual ASPOSECPP_SHARED_API DateTime ReadElementContentAsDateTime ()
 Returns the content of the current element as a DateTime. Moves to the node following the element's end tag. More...
 
virtual ASPOSECPP_SHARED_API DateTime ReadElementContentAsDateTime (const String &localName, const String &namespaceURI)
 Checks local name and namespace of the current element and returns its content as a DateTime. Moves to the node following the element's end tag. More...
 
virtual ASPOSECPP_SHARED_API int ReadElementContentAsInt (const String &localName, const String &namespaceURI)
 Checks if the current node is an element whose local name and namespce URI match the specified values and returns its content as 32-bit integer value. More...
 
virtual ASPOSECPP_SHARED_API int ReadElementContentAsInt ()
 Returns the content of the current element as an int. Moves to the node following the element's end tag. More...
 
virtual ASPOSECPP_SHARED_API bool ReadElementContentAsBoolean ()
 Returns the content of the current element as a boolean. Moves to the node following the element's end tag. More...
 
virtual ASPOSECPP_SHARED_API bool ReadElementContentAsBoolean (const String &localName, const String &namespaceURI)
 Checks if the current node is an element whose local name and namespce URI match the specified values and returns its content as boolean value. More...
 
virtual ASPOSECPP_SHARED_API String ReadElementContentAsString (const String &localName, const String &namespaceURI)
 Checks if the current node is an element whose local name and namespce URI match the specified values and returns its content as string. More...
 
virtual ASPOSECPP_SHARED_API String ReadElementContentAsString ()
 Returns the content of the current element as a string. Moves to the node following the element's end tag. More...
 
virtual ASPOSECPP_SHARED_API void ReadEndElement ()
 Determines if the current content node is an end tag and advances the reader to the next node. More...
 
virtual ASPOSECPP_SHARED_API bool IsStartElement ()
 Calls MoveToContent() and then determines if the current node is a start tag or an empty element tag. More...
 
virtual ASPOSECPP_SHARED_API bool IsStartElement (const String &name)
 Calls MoveToContent() and then determines if the current node is a start tag or an empty element tag and if the found node's qualified name matches the specified value. More...
 
virtual ASPOSECPP_SHARED_API bool IsStartElement (const String &name, const String &ns)
 Calls MoveToContent() and then determines if the current node is a start tag or an empty element tag and if the found node's qualified name matches the specified value. More...
 
xmlTextReader * native () const
 Returns a pointer to the underlying libxml2 xmlTextReader object. More...
 
- Public Member Functions inherited from System::IDisposable
virtual void Dispose ()
 Does nothing. 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 refernce 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 int 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 (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from System::Xml::XmlReader
static ASPOSECPP_SHARED_API XmlReader::Ptr Create (const String &inputUri)
 Constructs an instance of the XmlReader class that reads XML data from the specified file. More...
 
static ASPOSECPP_SHARED_API XmlReader::Ptr Create (const SharedPtr< System::IO::Stream > &input)
 Constructs an instance of the XmlReader class that reads XML data from the specified stream. More...
 
static ASPOSECPP_SHARED_API XmlReader::Ptr Create (const SharedPtr< System::IO::TextReader > &input)
 Constructs an instance of the XmlReader class that reads XML data from the specified TextReader. More...
 
static ASPOSECPP_SHARED_API XmlReader::Ptr Create (const String &inputUri, const SharedPtr< XmlReaderSettings > &settings)
 Constructs an instance of the XmlReader class that reads XML data from the specified file using the specified settings. More...
 
static ASPOSECPP_SHARED_API XmlReader::Ptr Create (const SharedPtr< System::IO::Stream > &input, const SharedPtr< XmlReaderSettings > &settings)
 Constructs an instance of the XmlReader class that reads XML data from the specified stream using the specified settings. More...
 
static ASPOSECPP_SHARED_API XmlReader::Ptr Create (const SharedPtr< System::IO::Stream > &input, const SharedPtr< XmlReaderSettings > &settings, const String &baseUri)
 NOT IMPLEMENTED. More...
 
static ASPOSECPP_SHARED_API XmlReader::Ptr Create (const SharedPtr< System::IO::TextReader > &input, const SharedPtr< XmlReaderSettings > &settings)
 Constructs an instance of the XmlReader class that reads XML data from the specified TextReader using the specified settings. More...
 
static ASPOSECPP_SHARED_API XmlReader::Ptr Create (const SharedPtr< System::IO::TextReader > &input, const SharedPtr< XmlReaderSettings > &settings, const SharedPtr< XmlParserContext > &inputContext)
 Constructs an instance of the XmlReader class that reads XML data from the specified TextReader using the specified settings and cotext information for parsing. More...
 
static ASPOSECPP_SHARED_API XmlReader::Ptr Create (const SharedPtr< System::IO::Stream > &input, const SharedPtr< XmlReaderSettings > &settings, const SharedPtr< XmlParserContext > &inputContext)
 Constructs an instance of the XmlReader class that reads XML data from the specified stream using the specified settings and cotext information for parsing. More...
 
static ASPOSECPP_SHARED_API XmlReader::Ptr Create (const SharedPtr< System::IO::TextReader > &input, const SharedPtr< XmlReaderSettings > &settings, const System::String &baseUrl)
 Constructs an instance of the XmlReader class that reads XML data from the specified TextReader using the specified settings and base URI. More...
 
static ASPOSECPP_SHARED_API XmlReader::Ptr Create (const XmlReader::Ptr &input, const SharedPtr< XmlReaderSettings > &settings)
 Constructs an instance of the XmlReader class that uses the specified XmlReader object as underlying reader. 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 ()
 Impleemnts C# typeof(System.Object) construct. 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...
 

Detailed Description

Provides non-cached forward-only access to XML data. Objects of this class should only be allocated using System::MakeObject() function. Never create instance 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/13]

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

Constructs an instance of the XmlTextReader class that reads XML data from the specified file.

Parameters
inputUriURI of the file containing the XML to read

◆ XmlTextReader() [2/13]

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

Constructs an instance of the XmlTextReader class that reads XML data from the specified stream.

Parameters
inputA System::IO::Stream object to read the XML data from

◆ XmlTextReader() [3/13]

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

Constructs an instance of the XmlTextReader class that reads XML data from the specified TextReader.

Parameters
inputA TextReader object to read the XML data from

◆ XmlTextReader() [4/13]

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

Constructs an instance of the XmlTextReader class that reads XML data from the specified stream; a parameter specifies an URL to resolve resources.

Parameters
urlAn URL used to resolve external resources encountered in the XML document being read
inputA stream to read the XML data from

◆ XmlTextReader() [5/13]

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

Constructs an instance of the XmlTextReader class that reads XML data from the specified TextReader; a parameter specifies an URL to resolve resources.

Parameters
urlAn URL used to resolve external resources encountered in the XML document being read
inputA TextReader object to read the XML data from

◆ XmlTextReader() [6/13]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const String inputUri,
const XmlReaderSettings::Ptr settings 
)

Constructs an instance of the XmlTextReader class that reads XML data from the specified file using the specified settings.

Parameters
inputUriURI of the file containing the XML to read
settingsThe settings of the XmlReader being created

◆ XmlTextReader() [7/13]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const SharedPtr< System::IO::Stream > &  input,
const XmlReaderSettings::Ptr settings 
)

Constructs an instance of the XmlTextReader class that reads XML data from the specified stream using the specified settings.

Parameters
inputA System::IO::Stream object to read the XML data from
settingsThe settings of the XmlReader being created

◆ XmlTextReader() [8/13]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const SharedPtr< System::IO::TextReader > &  input,
const XmlReaderSettings::Ptr settings 
)

Constructs an instance of the XmlTextReader class that reads XML data from the specified TextReader using the specified settings.

Parameters
inputA TextReader object to read the XML data from
settingsThe settings of the XmlReader being created

◆ XmlTextReader() [9/13]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const SharedPtr< System::IO::TextReader > &  input,
const XmlReaderSettings::Ptr settings,
const XmlParserContext::Ptr context 
)

Constructs an instance of the XmlTextReader class that reads XML data from the specified TextReader using the specified settings and context information for parsing.

Parameters
inputA TextReader object to read the XML data from
settingsThe settings of the XmlReader being created
contextThe context information used to parse the XML fragment

◆ XmlTextReader() [10/13]

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

Constructs an instance of the XmlTextReader class that reads an XML fragment of the specified type from the specified stream using the specified context information for parsing.

Parameters
inputA System::IO::Stream object to read the XML data from
fragTypeThe type of the fragment read from the stream input
contextThe context information used to parse the XML fragment

◆ XmlTextReader() [11/13]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const String xmlFragment,
XmlNodeType  fragType,
const XmlParserContext::Ptr context 
)

Constructs an instance of the XmTextReader class that reads an XML fragment of the specified type from the specified string using context information for parsing.

Parameters
xmlFragmentAn XML fragment represented as a string
fragTypeThe type of the fragment being read
contextThe context information used to parse the XML fragment

◆ XmlTextReader() [12/13]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const SharedPtr< System::IO::Stream > &  input,
const XmlReaderSettings::Ptr settings,
const XmlParserContext::Ptr context 
)

Constructs an instance of the XmlTextReader class that reads XML data from the specified stream using the specified settings and context information for parsing.

Parameters
inputA System::IO::Stream object to read the XML data from
settingsThe settings of the XmlReader being created
contextThe context information used to parse the XML fragment

◆ XmlTextReader() [13/13]

ASPOSECPP_SHARED_API System::Xml::XmlTextReader::XmlTextReader ( const String xmlFragment,
const XmlReaderSettings::Ptr settings,
const XmlParserContext::Ptr context 
)

Constructs an instance of the XmTextReader class that reads an XML fragment specified as a string using the specified settings and context information for parsing.

Parameters
xmlFragmentAn XML fragment represented as a string
settingsThe settings of the XmlReader being created
contextThe context information used to parse the XML fragment

◆ ~XmlTextReader()

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

Destructor.

Member Function Documentation

◆ Close()

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

Changes the state of the reader to ReadState::Closed.

Implements System::Xml::XmlReader.

◆ get_AttributeCount()

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

Returns the number of attributes in 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.

Reimplemented from System::Xml::XmlReader.

◆ get_CanResolveEntity()

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

Determines whether the current XmlReader object can parse and resolve entities.

Reimplemented from System::Xml::XmlReader.

◆ get_Depth()

ASPOSECPP_SHARED_API int System::Xml::XmlTextReader::get_Depth ( )
overridevirtual

Returns the depths of the current node in the XML tree.

Reimplemented from System::Xml::XmlReader.

◆ get_Encoding()

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

Returns the document's encoding.

◆ get_EOF()

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

Determines if the reader has reached the end of stream.

Reimplemented from System::Xml::XmlReader.

◆ get_HasAttributes()

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

Determines if the current node has any attributes.

Reimplemented from System::Xml::XmlReader.

◆ get_HasValue()

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

Determines if the current node has a value.

Reimplemented from System::Xml::XmlReader.

◆ get_IsDefault()

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

Determines if the current node is an attribute that was generated from the default value defined in the DTD or schema.

Reimplemented from System::Xml::XmlReader.

◆ get_IsEmptyElement()

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

Determines if the current node is an empty element.

Implements System::Xml::XmlReader.

◆ get_LineNumber()

ASPOSECPP_SHARED_API int System::Xml::XmlTextReader::get_LineNumber ( ) const

Returns the current line number.

◆ get_LinePosition()

ASPOSECPP_SHARED_API int System::Xml::XmlTextReader::get_LinePosition ( ) const

Returns the current line position.

◆ get_LocalName()

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

Returns the local name of the current node.

Reimplemented from System::Xml::XmlReader.

◆ get_Name()

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

Returns the qualified name of the current node.

Reimplemented from System::Xml::XmlReader.

◆ get_NamespaceURI()

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

Returns the namespace URI of the current node.

Reimplemented from System::Xml::XmlReader.

◆ get_NameTable()

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

Returns the name table used by the current object.

Reimplemented from System::Xml::XmlReader.

◆ get_NodeType()

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

Returns the type of the current node.

Implements System::Xml::XmlReader.

◆ get_Prefix()

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

Returns the prefix of the current node.

Reimplemented from System::Xml::XmlReader.

◆ get_QuoteChar()

ASPOSECPP_SHARED_API UChar System::Xml::XmlTextReader::get_QuoteChar ( )
overridevirtual

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

Reimplemented from System::Xml::XmlReader.

◆ get_ReadState()

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

Returns the current state of the reader.

Reimplemented from System::Xml::XmlReader.

◆ get_Settings()

ASPOSECPP_SHARED_API SharedPtr<XmlReaderSettings> System::Xml::XmlTextReader::get_Settings ( ) const
overridevirtual

Returns the settings of the XmlReader.

Returns
The settings object

Reimplemented from System::Xml::XmlReader.

◆ get_Value()

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

Returns the value of the current node.

Implements System::Xml::XmlReader.

◆ get_XmlLang()

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

Returns the current xml:lang scope.

Reimplemented from System::Xml::XmlReader.

◆ GetAttribute() [1/2]

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

Returns the value of the attribute with the specified name and namespace.

Parameters
localNameThe local name of the attribute
namespaceURIThe URI of namespace used.
Returns
The value of the attribute with name localName and namespace namespaceURI

Reimplemented from System::Xml::XmlReader.

◆ GetAttribute() [2/2]

ASPOSECPP_SHARED_API String System::Xml::XmlTextReader::GetAttribute ( const 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 attribute with name name

Reimplemented from System::Xml::XmlReader.

◆ LookupNamespace()

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

Resolves a namespace prefix in the scope of the current element.

Parameters
prefixThe prefix to resolve
Returns
The namespace URI associated with the specified prefix

Implements System::Xml::XmlReader.

◆ MoveToAttribute() [1/2]

ASPOSECPP_SHARED_API bool System::Xml::XmlTextReader::MoveToAttribute ( const String name)
overridevirtual

Moves the reader's position to the attribute with the specified name.

Parameters
nameThe qualified name of the attribute to move the position to
Returns
True if the operation succeeded, otherwise - false

Reimplemented from System::Xml::XmlReader.

◆ MoveToAttribute() [2/2]

ASPOSECPP_SHARED_API void System::Xml::XmlTextReader::MoveToAttribute ( int  index)
overridevirtual

Moves the reader's position to the attribute with the specified index.

Parameters
indexA 0-based index of the attribute in the list of attributes of the current node

Reimplemented from System::Xml::XmlReader.

◆ MoveToContent()

ASPOSECPP_SHARED_API XmlNodeType System::Xml::XmlTextReader::MoveToContent ( )
overridevirtual

Moves the position of the reader to the next content node, skipping the non-content nodes.

Returns
The type of the node to which the reader's position was moved

Implements System::Xml::XmlReader.

◆ MoveToElement()

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

Moves the reader's position to the element node that contains the current attribute node.

Returns
True if the operation succeeded, otherwise - false

Implements System::Xml::XmlReader.

◆ MoveToFirstAttribute()

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

Moves the reader's position to the first attribute in the list of attributes of the current node.

Returns
True if the operation succeeded, otherwise - false

Reimplemented from System::Xml::XmlReader.

◆ MoveToNextAttribute()

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

Moves the reader's position to the next attribute.

Returns
True if the operation succeeded, otherwise - false

Reimplemented from System::Xml::XmlReader.

◆ native_parse_flags()

int System::Xml::XmlTextReader::native_parse_flags ( ) const
inline

Returns a bitwise set of flags used by the underlying libxml2 xmlTextReader object.

◆ Next()

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

Reads the next node.

Returns
True if the operation succeeded, otherwise - false Reads to the next sibling node.
True on success, false if there's nothing left to read.

Reimplemented from System::Xml::XmlReader.

◆ RaiseLastError()

void System::Xml::XmlTextReader::RaiseLastError ( )
overridevirtual

Reimplemented from System::Xml::XmlReader.

◆ Read()

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

Reads to the next node, including subtree (if any).

Returns
True on success, false if there's nothing left to read.

Implements System::Xml::XmlReader.

◆ ReadBinHex()

ASPOSECPP_SHARED_API int System::Xml::XmlTextReader::ReadBinHex ( const ArrayPtr< uint8_t > &  buffer,
int  startPosition,
int  length 
)

Decodes a BinHex-encoded data and returns decoded bytes.

Parameters
bufferThe output argument; a array to which the decoded bytes are written
startPositionA 0-based index in the buffer at which to start writing the decoded bytes
lengthThe number of bytes to write to the output buffer
Returns
The number of bytes written to the output buffer

◆ ReadElementContentAsBase64()

ASPOSECPP_SHARED_API int System::Xml::XmlTextReader::ReadElementContentAsBase64 ( const ArrayPtr< uint8_t > &  buffer,
int  index,
int  count 
)
overridevirtual

Call this methods until it returns 0 to get all the data.

Returns
Decoded bytes of the current base64 element content

Reimplemented from System::Xml::XmlReader.

◆ ReadElementString() [1/3]

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

Reads the contents of a text-only element.

Returns
The contents of the current element

Implements System::Xml::XmlReader.

◆ ReadElementString() [2/3]

ASPOSECPP_SHARED_API String System::Xml::XmlTextReader::ReadElementString ( const String localName,
const String namespaceUri 
)
overridevirtual

Checks if the current node is an element whose local name and namespace URI match the specified values and returns its content as string.

Parameters
localNameThe local name of the element
namespaceUriThe namespace URI of the element
Returns
The element's content as a string

Implements System::Xml::XmlReader.

◆ ReadElementString() [3/3]

ASPOSECPP_SHARED_API String System::Xml::XmlTextReader::ReadElementString ( const String value)
overridevirtual

Checks if the current node is an element whose qualified name matches the specified value and reads its content.

Parameters
valueThe element's qualified name
Returns
The contents of the current element as a string

Implements System::Xml::XmlReader.

◆ ReadInnerXml()

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

Returns a string containing all the content of the current node, including the markup, but excluding start and end tags.

Implements System::Xml::XmlReader.

◆ ReadOuterXml()

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

Returns a string containing all the content of the current node, including the markup, and including start and end tags.

Implements System::Xml::XmlReader.

◆ ReadStartElement() [1/3]

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

Checks if the current content node is an element and moves the the reader's position to the next node.

Implements System::Xml::XmlReader.

◆ ReadStartElement() [2/3]

ASPOSECPP_SHARED_API void System::Xml::XmlTextReader::ReadStartElement ( const String localName,
const String namespaceUri 
)
overridevirtual

Checks if the current content node is an element with the specified local name and namespace URI and moves the the reader's position to the next node.

Parameters
localNameThe element's local name
namespaceUriThe element's namespace URI

Implements System::Xml::XmlReader.

◆ ReadStartElement() [3/3]

ASPOSECPP_SHARED_API void System::Xml::XmlTextReader::ReadStartElement ( const String name)
overridevirtual

Checks if the current content node is an element with the specified qualified name and moves the the reader's position to the next node.

Parameters
nameThe element's qualified name

Implements System::Xml::XmlReader.

◆ ReadString()

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

Reads the contents of an element or a text node.

Returns
The contents of an element or a text node as a string.

Implements System::Xml::XmlReader.

◆ ReadSubtreeInnerXml()

ASPOSECPP_SHARED_API String System::Xml::XmlTextReader::ReadSubtreeInnerXml ( )

Returns a string containing all the content of the current node, including the markup, but excluding start and end tags. Unlike ReadInnerXml() it doesn't move current node.

◆ 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 ( DtdProcessing  value)

Sets a value that determines the processing of DTD.

Parameters
valueThe value to set

◆ set_EntityHandling()

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

Sets a value that specifies how the reader should handle entities.

Parameters
valueThe value to set

◆ set_Normalization()

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

Sets a value that indicates if the white space and attribute values should be normalized.

Parameters
valueThe value to set

◆ set_ProhibitDtd()

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

Sets a value that indicates if DTD processing should be prohibited.

Parameters
valueThe value to set

◆ set_WhitespaceHandling()

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

Sets a value that indicates how the whitespace characters should be handled by the reader.

Parameters
valueThe value to set

◆ set_XmlResolver()

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

Sets the XML Resolver object used to access external XML documents.

Parameters
valueThe XmlResolver object to set

◆ Skip()

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

Skips the children of the current node.

Implements System::Xml::XmlReader.