Asposecpplib
System::Xml::XmlReader Class Referenceabstract

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::IDisposable.

Inherited by System::Xml::XmlTextReader.

Public Types

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

virtual ASPOSECPP_SHARED_API String get_Name ()
 Returns the qualified name of the current node. More...
 
virtual ASPOSECPP_SHARED_API String get_Prefix ()
 Returns the prefix of the current node. More...
 
virtual ASPOSECPP_SHARED_API String get_LocalName ()
 Returns the local name of the current node. More...
 
virtual ASPOSECPP_SHARED_API String get_NamespaceURI ()
 Returns the namespace URI of the current node. More...
 
virtual ASPOSECPP_SHARED_API String get_BaseURI ()
 Returns the base URI of the current node. More...
 
virtual ASPOSECPP_SHARED_API String get_Value ()=0
 Returns the value of the current node. More...
 
ASPOSECPP_SHARED_API String idx_get (const String &name)
 Returns the value of the attribute with the specified name. More...
 
virtual ASPOSECPP_SHARED_API ReadState get_ReadState ()
 Returns the current state of the reader. More...
 
virtual ASPOSECPP_SHARED_API bool get_IsEmptyElement ()=0
 Determines if the current node is an empty element. More...
 
virtual ASPOSECPP_SHARED_API bool get_IsDefault ()
 Determines if the current node is an attribute that was generated from the default value defined in the DTD or schema. More...
 
virtual ASPOSECPP_SHARED_API int get_Depth ()
 Returns the depths of the current node in the XML tree. More...
 
virtual ASPOSECPP_SHARED_API bool get_EOF ()
 Determines if the reader has reached the end of stream. More...
 
virtual ASPOSECPP_SHARED_API bool get_HasAttributes ()
 Determines if the current node has any attributes. More...
 
virtual ASPOSECPP_SHARED_API int get_AttributeCount ()=0
 Returns the number of attributes in the current node. More...
 
virtual ASPOSECPP_SHARED_API bool get_HasValue ()
 Determines if the current node has a value. More...
 
virtual ASPOSECPP_SHARED_API String get_XmlLang ()
 Returns the current xml:lang scope. More...
 
virtual ASPOSECPP_SHARED_API UChar get_QuoteChar ()
 Returns the used as quotation mark character used to enclose the value of an XML attribute node. More...
 
virtual ASPOSECPP_SHARED_API XmlNodeType get_NodeType ()=0
 Returns the type of the current node. More...
 
virtual ASPOSECPP_SHARED_API bool get_CanResolveEntity ()
 Determines whether the current XmlReader object can parse and resolve entities. 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 String GetAttribute (const String &name)
 Returns the value of the attribute with the specified name. More...
 
virtual ASPOSECPP_SHARED_API bool MoveToAttribute (const String &name)
 Moves the reader's position to the attribute with the specified name. More...
 
virtual ASPOSECPP_SHARED_API String GetAttribute (const String &localName, const String &namespaceURI)
 Gets the value of the attribute with the specified local name and namespace URI. More...
 
virtual ASPOSECPP_SHARED_API void MoveToAttribute (int index)
 Moves the reader's position to the attribute with the specified index. More...
 
virtual ASPOSECPP_SHARED_API bool MoveToNextAttribute ()
 Moves the reader's position to the next attribute. More...
 
virtual ASPOSECPP_SHARED_API bool MoveToFirstAttribute ()
 Moves the reader's position to the first attribute in the list of attributes of the current node. 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 XmlNodeType MoveToContent ()=0
 Moves the position of the reader to the next content node, skipping the non-content nodes. More...
 
virtual ASPOSECPP_SHARED_API bool MoveToElement ()=0
 Moves the reader's position to the element node that contains the current attribute node. More...
 
virtual ASPOSECPP_SHARED_API bool Next ()
 Navigates to the next token. More...
 
virtual ASPOSECPP_SHARED_API bool Read ()=0
 Reads the next node. More...
 
virtual ASPOSECPP_SHARED_API String LookupNamespace (const String &prefix)=0
 Resolves a namespace prefix in the scope of the current element. More...
 
virtual ASPOSECPP_SHARED_API void Skip ()=0
 Skips the children of the current node. More...
 
virtual ASPOSECPP_SHARED_API void Close ()=0
 Changes the state of the reader to ReadState::Closed. More...
 
virtual ASPOSECPP_SHARED_API String ReadString ()=0
 Reads the contents of an element or a text node. More...
 
virtual ASPOSECPP_SHARED_API void ReadStartElement ()=0
 Checks if the current content node is an element and moves the the reader's position to the next node. More...
 
virtual ASPOSECPP_SHARED_API void ReadStartElement (const String &value)=0
 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...
 
virtual ASPOSECPP_SHARED_API void ReadStartElement (const String &localName, const String &namespaceUri)=0
 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...
 
virtual ASPOSECPP_SHARED_API String ReadInnerXml ()=0
 Returns a string containing all the content of the current node, including the markup, but excluding start and end tags. More...
 
virtual ASPOSECPP_SHARED_API String ReadOuterXml ()=0
 Returns a string containing all the content of the current node, including the markup, and including start and end tags. 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 SharedPtr< System::Xml::XmlNameTableget_NameTable ()
 Gets name table associated with document being read. More...
 
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 bool ReadAttributeValue ()=0
 Reads next attribute's value. 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 int ReadElementContentAsBase64 (const ArrayPtr< uint8_t > &buffer, int index, int count)
 Call this methods until it returns 0 to get all the data. 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...
 
virtual ASPOSECPP_SHARED_API String ReadElementString ()=0
 Reads the contents of a text-only element. More...
 
virtual ASPOSECPP_SHARED_API String ReadElementString (const String &value)=0
 Checks if the current node is an element whose qualified name matches the specified value and reads its content. More...
 
virtual ASPOSECPP_SHARED_API String ReadElementString (const String &localName, const String &namespaceUri)=0
 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 void ResolveEntity ()=0
 resolves the entity reference for EntityReference nodes. More...
 
virtual ASPOSECPP_SHARED_API SharedPtr< XmlReaderSettingsget_Settings () const
 Returns the settings of the XmlReader. More...
 
xmlTextReader * native () const
 Returns a pointer to the underlying libxml2 xmlTextReader object. More...
 
std::shared_ptr< xmlDoc > native_doc ()
 Returns a pointer to the current document used by the xmlTextReader object. More...
 
virtual void RaiseLastError ()
 
- 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 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 (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...
 

Static Public Member Functions

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.

Member Function Documentation

◆ Close()

virtual ASPOSECPP_SHARED_API void System::Xml::XmlReader::Close ( )
pure virtual

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

Implemented in System::Xml::XmlTextReader.

◆ Create() [1/11]

static ASPOSECPP_SHARED_API XmlReader::Ptr System::Xml::XmlReader::Create ( const SharedPtr< System::IO::Stream > &  input)
static

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

Parameters
inputA System::IO::Stream object to read the XML data from
Returns
A shared pointer to the created XmlReader

◆ Create() [2/11]

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

Constructs an instance of the XmlReader 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
Returns
A shared pointer to the created XmlReader

◆ Create() [3/11]

static ASPOSECPP_SHARED_API XmlReader::Ptr System::Xml::XmlReader::Create ( const SharedPtr< System::IO::Stream > &  input,
const SharedPtr< XmlReaderSettings > &  settings,
const SharedPtr< XmlParserContext > &  inputContext 
)
static

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

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

◆ Create() [4/11]

static ASPOSECPP_SHARED_API XmlReader::Ptr System::Xml::XmlReader::Create ( const SharedPtr< System::IO::Stream > &  input,
const SharedPtr< XmlReaderSettings > &  settings,
const String baseUri 
)
static

NOT IMPLEMENTED.

Exceptions
NotImplementedException

◆ Create() [5/11]

static ASPOSECPP_SHARED_API XmlReader::Ptr System::Xml::XmlReader::Create ( const SharedPtr< System::IO::TextReader > &  input)
static

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

Parameters
inputA TextReader object to read the XML data from
Returns
A shared pointer to the created XmlReader

◆ Create() [6/11]

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

Constructs an instance of the XmlReader 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
Returns
A shared pointer to the created XmlReader

◆ Create() [7/11]

static ASPOSECPP_SHARED_API XmlReader::Ptr System::Xml::XmlReader::Create ( const SharedPtr< System::IO::TextReader > &  input,
const SharedPtr< XmlReaderSettings > &  settings,
const SharedPtr< XmlParserContext > &  inputContext 
)
static

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

Parameters
inputA TextReader object to read the XML data from
settingsThe settings of the XmlReader being created
inputContextThe context information used to parse the XML fragment
Returns
A shared pointer to the created XmlReader

◆ Create() [8/11]

static ASPOSECPP_SHARED_API XmlReader::Ptr System::Xml::XmlReader::Create ( const SharedPtr< System::IO::TextReader > &  input,
const SharedPtr< XmlReaderSettings > &  settings,
const System::String baseUrl 
)
static

Constructs an instance of the XmlReader class that reads XML data from the specified TextReader using the specified settings and base URI.

Parameters
inputA TextReader object to read the XML data from
settingsThe settings of the XmlReader being created
baseUrlThe base URI for the XML document being read; used to resolve relative URIs in the XML document being read
Returns
A shared pointer to the created XmlReader

◆ Create() [9/11]

static ASPOSECPP_SHARED_API XmlReader::Ptr System::Xml::XmlReader::Create ( const String inputUri)
static

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

Parameters
inputUriURI of the file containing the XML to read
Returns
A shared pointer to the created XmlReader

◆ Create() [10/11]

static ASPOSECPP_SHARED_API XmlReader::Ptr System::Xml::XmlReader::Create ( const String inputUri,
const SharedPtr< XmlReaderSettings > &  settings 
)
static

Constructs an instance of the XmlReader 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
Returns
A shared pointer to the created XmlReader

◆ Create() [11/11]

static ASPOSECPP_SHARED_API XmlReader::Ptr System::Xml::XmlReader::Create ( const XmlReader::Ptr input,
const SharedPtr< XmlReaderSettings > &  settings 
)
static

Constructs an instance of the XmlReader class that uses the specified XmlReader object as underlying reader.

Parameters
inputA XmlReader object to be used as underlying reader
settingsThe settings of the XmlReader being created
Returns
A shared pointer to the created XmlReader

◆ get_AttributeCount()

virtual ASPOSECPP_SHARED_API int System::Xml::XmlReader::get_AttributeCount ( )
pure virtual

Returns the number of attributes in the current node.

Implemented in System::Xml::XmlTextReader.

◆ get_BaseURI()

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::get_BaseURI ( )
virtual

Returns the base URI of the current node.

Reimplemented in System::Xml::XmlTextReader.

◆ get_CanResolveEntity()

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::get_CanResolveEntity ( )
virtual

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

Reimplemented in System::Xml::XmlTextReader.

◆ get_Depth()

virtual ASPOSECPP_SHARED_API int System::Xml::XmlReader::get_Depth ( )
virtual

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

Reimplemented in System::Xml::XmlTextReader.

◆ get_EOF()

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::get_EOF ( )
virtual

Determines if the reader has reached the end of stream.

Reimplemented in System::Xml::XmlTextReader.

◆ get_HasAttributes()

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::get_HasAttributes ( )
virtual

Determines if the current node has any attributes.

Reimplemented in System::Xml::XmlTextReader.

◆ get_HasValue()

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::get_HasValue ( )
virtual

Determines if the current node has a value.

Reimplemented in System::Xml::XmlTextReader.

◆ get_IsDefault()

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::get_IsDefault ( )
virtual

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

Reimplemented in System::Xml::XmlTextReader.

◆ get_IsEmptyElement()

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::get_IsEmptyElement ( )
pure virtual

Determines if the current node is an empty element.

Implemented in System::Xml::XmlTextReader.

◆ get_LocalName()

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::get_LocalName ( )
virtual

Returns the local name of the current node.

Reimplemented in System::Xml::XmlTextReader.

◆ get_Name()

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::get_Name ( )
virtual

Returns the qualified name of the current node.

Reimplemented in System::Xml::XmlTextReader.

◆ get_NamespaceURI()

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::get_NamespaceURI ( )
virtual

Returns the namespace URI of the current node.

Reimplemented in System::Xml::XmlTextReader.

◆ get_NameTable()

virtual SharedPtr<System::Xml::XmlNameTable> System::Xml::XmlReader::get_NameTable ( )
virtual

Gets name table associated with document being read.

Returns
XmlNameTable object pointer.

Reimplemented in System::Xml::XmlTextReader.

◆ get_NodeType()

virtual ASPOSECPP_SHARED_API XmlNodeType System::Xml::XmlReader::get_NodeType ( )
pure virtual

Returns the type of the current node.

Implemented in System::Xml::XmlTextReader.

◆ get_Prefix()

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::get_Prefix ( )
virtual

Returns the prefix of the current node.

Reimplemented in System::Xml::XmlTextReader.

◆ get_QuoteChar()

virtual ASPOSECPP_SHARED_API UChar System::Xml::XmlReader::get_QuoteChar ( )
virtual

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

Reimplemented in System::Xml::XmlTextReader.

◆ get_ReadState()

virtual ASPOSECPP_SHARED_API ReadState System::Xml::XmlReader::get_ReadState ( )
virtual

Returns the current state of the reader.

Reimplemented in System::Xml::XmlTextReader.

◆ get_Settings()

virtual ASPOSECPP_SHARED_API SharedPtr<XmlReaderSettings> System::Xml::XmlReader::get_Settings ( ) const
virtual

Returns the settings of the XmlReader.

Returns
The settings object

Reimplemented in System::Xml::XmlTextReader.

◆ get_Value()

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::get_Value ( )
pure virtual

Returns the value of the current node.

Implemented in System::Xml::XmlTextReader.

◆ get_XmlLang()

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::get_XmlLang ( )
virtual

Returns the current xml:lang scope.

Reimplemented in System::Xml::XmlTextReader.

◆ GetAttribute() [1/3]

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::GetAttribute ( const String localName,
const String namespaceURI 
)
virtual

Gets 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, null is returned. This method does not move the reader.

Reimplemented in System::Xml::XmlTextReader.

◆ GetAttribute() [2/3]

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::GetAttribute ( const String name)
virtual

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

◆ GetAttribute() [3/3]

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::GetAttribute ( int32_t  index)
virtual

Returns the value of the attribute with the specified index.

Parameters
indexA 0-based index of the attribute in the list of attributes of the current node
Returns
The value of the attribute with index index

◆ idx_get()

ASPOSECPP_SHARED_API String System::Xml::XmlReader::idx_get ( const String name)

Returns the value of the attribute with the specified name.

Parameters
nameThe name of the attribute
Returns
The value of the attribute whose name is name

◆ IsStartElement() [1/3]

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::IsStartElement ( )
virtual

Calls MoveToContent() and then determines if the current node is a start tag or an empty element tag.

Returns
True if the current node is a start tag or an empty element tag, otherwise - false

◆ IsStartElement() [2/3]

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::IsStartElement ( const String name)
virtual

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.

Parameters
nameThe string to match the node's qualified name against
Returns
True if the current node is a start tag or an empty element tag and its qualified name matches name, otherwise - false

◆ IsStartElement() [3/3]

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::IsStartElement ( const String name,
const String ns 
)
virtual

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.

Parameters
nameThe string to match the node's name against
nsThe string to match the node's namespace against
Returns
True if the current node is a start tag or an empty element tag and its qualified name matches name, otherwise - false

◆ LookupNamespace()

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::LookupNamespace ( const String prefix)
pure virtual

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

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

Implemented in System::Xml::XmlTextReader.

◆ MoveToAttribute() [1/2]

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::MoveToAttribute ( const String name)
virtual

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

◆ MoveToAttribute() [2/2]

virtual ASPOSECPP_SHARED_API void System::Xml::XmlReader::MoveToAttribute ( int  index)
virtual

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

◆ MoveToContent()

virtual ASPOSECPP_SHARED_API XmlNodeType System::Xml::XmlReader::MoveToContent ( )
pure virtual

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

Implemented in System::Xml::XmlTextReader.

◆ MoveToElement()

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::MoveToElement ( )
pure virtual

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

Returns
True if the operation succeeded, otherwise - false

Implemented in System::Xml::XmlTextReader.

◆ MoveToFirstAttribute()

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::MoveToFirstAttribute ( )
virtual

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

◆ MoveToNextAttribute()

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::MoveToNextAttribute ( )
virtual

Moves the reader's position to the next attribute.

Returns
True if the operation succeeded, otherwise - false

Reimplemented in System::Xml::XmlTextReader.

◆ native()

xmlTextReader* System::Xml::XmlReader::native ( ) const
inline

Returns a pointer to the underlying libxml2 xmlTextReader object.

◆ native_doc()

std::shared_ptr<xmlDoc> System::Xml::XmlReader::native_doc ( )

Returns a pointer to the current document used by the xmlTextReader object.

◆ Next()

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::Next ( )
virtual

Navigates to the next token.

Returns
True if successful, false otherwise.

Reimplemented in System::Xml::XmlTextReader.

◆ RaiseLastError()

virtual void System::Xml::XmlReader::RaiseLastError ( )
virtual

Reimplemented in System::Xml::XmlTextReader.

◆ Read()

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::Read ( )
pure virtual

Reads the next node.

Returns
True if the operation succeeded, otherwise - false

Implemented in System::Xml::XmlTextReader.

◆ ReadAttributeValue()

virtual bool System::Xml::XmlReader::ReadAttributeValue ( )
pure virtual

Reads next attribute's value.

Returns
True if attribute is read, false otherwise.

Implemented in System::Xml::XmlTextReader.

◆ ReadContentAsBoolean()

virtual bool System::Xml::XmlReader::ReadContentAsBoolean ( )
virtual

Reads current element's contents as boolean.

Returns
Boolean representation of current element's contents.

◆ ReadContentAsDateTime()

virtual ASPOSECPP_SHARED_API DateTime System::Xml::XmlReader::ReadContentAsDateTime ( )
virtual

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.

Returns
Content as DateTime value

◆ ReadContentAsDecimal()

virtual Decimal System::Xml::XmlReader::ReadContentAsDecimal ( )
virtual

Reads current element's contents as decimal.

Returns
Decimal representation of current element's contents.

◆ ReadContentAsDouble()

virtual double System::Xml::XmlReader::ReadContentAsDouble ( )
virtual

Reads current element's contents as double.

Returns
Double representation of current element's contents.

◆ ReadContentAsFloat()

virtual float System::Xml::XmlReader::ReadContentAsFloat ( )
virtual

Reads current element's contents as float.

Returns
Float representation of current element's contents.

◆ ReadContentAsInt()

virtual int32_t System::Xml::XmlReader::ReadContentAsInt ( )
virtual

Reads current element's contents as integer.

Returns
Integer representation of current element's contents.

◆ ReadContentAsLong()

virtual int64_t System::Xml::XmlReader::ReadContentAsLong ( )
virtual

Reads current element's contents as long integer.

Returns
64-bit integer representation of current element's contents.

◆ ReadContentAsString()

virtual String System::Xml::XmlReader::ReadContentAsString ( )
virtual

Reads current element's contents as string.

Returns
String representation of current element's contents.

◆ ReadElementContentAsBase64()

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

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

Returns
Decoded bytes of the current base64 element content

Reimplemented in System::Xml::XmlTextReader.

◆ ReadElementContentAsBoolean() [1/2]

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::ReadElementContentAsBoolean ( )
virtual

Returns the content of the current element as a boolean. Moves to the node following the element's end tag.

Returns
The element's content as boolean

◆ ReadElementContentAsBoolean() [2/2]

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::ReadElementContentAsBoolean ( const String localName,
const String namespaceURI 
)
virtual

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.

Parameters
localNameThe local name of the element
namespaceURIThe namespace URI of the element
Returns
The element's content as boolean

◆ ReadElementContentAsDateTime() [1/2]

virtual ASPOSECPP_SHARED_API DateTime System::Xml::XmlReader::ReadElementContentAsDateTime ( )
virtual

Returns the content of the current element as a DateTime. Moves to the node following the element's end tag.

Returns
The element's content as DateTime value

◆ ReadElementContentAsDateTime() [2/2]

virtual ASPOSECPP_SHARED_API DateTime System::Xml::XmlReader::ReadElementContentAsDateTime ( const String localName,
const String namespaceURI 
)
virtual

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.

Parameters
localNameThe local name of the element
namespaceURIThe namespace URI of the element
Returns
The element's content as DateTime value

◆ ReadElementContentAsInt() [1/2]

virtual ASPOSECPP_SHARED_API int System::Xml::XmlReader::ReadElementContentAsInt ( )
virtual

Returns the content of the current element as an int. Moves to the node following the element's end tag.

Returns
The element's content as 32-bit integer value

◆ ReadElementContentAsInt() [2/2]

virtual ASPOSECPP_SHARED_API int System::Xml::XmlReader::ReadElementContentAsInt ( const String localName,
const String namespaceURI 
)
virtual

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.

Parameters
localNameThe local name of the element
namespaceURIThe namespace URI of the element
Returns
The element's content as 32-bit integer value

◆ ReadElementContentAsString() [1/2]

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::ReadElementContentAsString ( )
virtual

Returns the content of the current element as a string. Moves to the node following the element's end tag.

Returns
The element's content as string

◆ ReadElementContentAsString() [2/2]

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::ReadElementContentAsString ( const String localName,
const String namespaceURI 
)
virtual

Checks if the current node is an element whose local name and namespce 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 string

◆ ReadElementString() [1/3]

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::ReadElementString ( )
pure virtual

Reads the contents of a text-only element.

Returns
The contents of the current element

Implemented in System::Xml::XmlTextReader.

◆ ReadElementString() [2/3]

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::ReadElementString ( const String localName,
const String namespaceUri 
)
pure virtual

Checks if the current node is an element whose local name and namespce 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

Implemented in System::Xml::XmlTextReader.

◆ ReadElementString() [3/3]

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::ReadElementString ( const String value)
pure virtual

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

Implemented in System::Xml::XmlTextReader.

◆ ReadEndElement()

virtual ASPOSECPP_SHARED_API void System::Xml::XmlReader::ReadEndElement ( )
virtual

Determines if the current content node is an end tag and advances the reader to the next node.

◆ ReadInnerXml()

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::ReadInnerXml ( )
pure virtual

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

Implemented in System::Xml::XmlTextReader.

◆ ReadOuterXml()

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::ReadOuterXml ( )
pure virtual

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

Implemented in System::Xml::XmlTextReader.

◆ ReadStartElement() [1/3]

virtual ASPOSECPP_SHARED_API void System::Xml::XmlReader::ReadStartElement ( )
pure virtual

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

Implemented in System::Xml::XmlTextReader.

◆ ReadStartElement() [2/3]

virtual ASPOSECPP_SHARED_API void System::Xml::XmlReader::ReadStartElement ( const String localName,
const String namespaceUri 
)
pure virtual

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

Implemented in System::Xml::XmlTextReader.

◆ ReadStartElement() [3/3]

virtual ASPOSECPP_SHARED_API void System::Xml::XmlReader::ReadStartElement ( const String value)
pure virtual

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
valueThe element's qualified name

Implemented in System::Xml::XmlTextReader.

◆ ReadString()

virtual ASPOSECPP_SHARED_API String System::Xml::XmlReader::ReadString ( )
pure virtual

Reads the contents of an element or a text node.

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

Implemented in System::Xml::XmlTextReader.

◆ ReadSubtree()

virtual ASPOSECPP_SHARED_API Ptr System::Xml::XmlReader::ReadSubtree ( )
virtual

Read an element and all its children, and return a new XmlReader object set to ReadState::Initial.

◆ ReadToDescendant() [1/2]

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::ReadToDescendant ( const String localName,
const String namespaceURI 
)
virtual
Parameters
localNameThe local name of the element to move to.
namespaceURIThe namespce URI of the element to move to.
Returns
True if a matching descendant element is found; otherwise false.

◆ ReadToDescendant() [2/2]

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::ReadToDescendant ( const String name)
virtual

Reads to the first descendant of the current element with the given name.

Parameters
nameThe qualified name of the element to move to.
Returns
True if a matching descendant element is found; otherwise false.

◆ ReadToFollowing() [1/2]

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::ReadToFollowing ( const String localName,
const String namespaceURI 
)
virtual

Reads until an element with the specified local name name and namespace URI is encountered.

Parameters
localNameThe local name of the element to read until
namespaceURIThe namespce URI of the element to read until
Returns
True if the node with the specified local name and namespace URI has been found, otherwise - false

◆ ReadToFollowing() [2/2]

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::ReadToFollowing ( const String name)
virtual

Reads until an element with the specified name is encountered.

Parameters
nameThe qualified name of the element to read until
Returns
True if the node with the specified qualified name has been found, otherwise - false

◆ ReadToNextSibling()

virtual ASPOSECPP_SHARED_API bool System::Xml::XmlReader::ReadToNextSibling ( const String name)
virtual

Moves the position of the reader to the next sibling with the specified name.

Parameters
nameThe name of the sibling to move the reader's position to
Returns
True if the sibling node with the specified qualified name has been found, otherwise - false

◆ ResolveEntity()

virtual ASPOSECPP_SHARED_API void System::Xml::XmlReader::ResolveEntity ( )
pure virtual

resolves the entity reference for EntityReference nodes.

Implemented in System::Xml::XmlTextReader.

◆ Skip()

virtual ASPOSECPP_SHARED_API void System::Xml::XmlReader::Skip ( )
pure virtual

Skips the children of the current node.

Implemented in System::Xml::XmlTextReader.