5#include <xml/xml_space.h>
6#include <xml/xml_node_type.h>
7#include <xml/read_state.h>
8#include <system/idisposable.h>
9#include <system/exceptions.h>
10#include <system/array.h>
32class IXmlNamespaceResolver;
33class ReadContentAsBinaryHelper;
40class XmlNamespaceManager;
42class XmlParserContext;
43class XmlReaderSettings;
44class XmlSqlBinaryReader;
45class XmlSubtreeReader;
46class XmlTextReaderImpl;
48class XmlWrappingReader;
52class XPathDocumentImpl;
54class XsdCachingReader;
55class XsdValidatingReader;
77 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
78 ASPOSECPP_SHARED_RTTI_INFO_DECL();
87 friend class XmlSqlBinaryReader;
89 friend class ReadContentAsBinaryHelper;
90 friend class XmlWrappingReader;
92 friend class XmlSubtreeReader;
93 friend class XmlTextReaderImpl;
94 friend class XsdCachingReader;
95 friend class XsdValidatingReader;
96 friend class XmlLoader;
97 friend class Schema::Parser;
98 friend class XPath::XPathDocumentImpl;
99 friend class Xsl::XsltOld::ReaderOutput;
201 virtual ASPOSECPP_SHARED_API
bool get_EOF() = 0;
542 virtual ASPOSECPP_SHARED_API
bool Read() = 0;
544 virtual ASPOSECPP_SHARED_API
void Close();
546 virtual ASPOSECPP_SHARED_API
void Skip();
908 static const int32_t DefaultBufferSize;
909 static const int32_t BiggerBufferSize;
910 static const int32_t MaxStreamLengthForDefaultBufferSize;
911 static const int32_t AsyncBufferSize;
914 bool get_IsDefaultInternal();
920 virtual ASPOSECPP_SHARED_API
void Dispose(
bool disposing);
924 static bool CanReadContentAs(
XmlNodeType nodeType);
925 static bool HasValueInternal(
XmlNodeType nodeType);
926 void CheckElement(
const String& localName,
const String& namespaceURI);
928 Exception CreateReadElementContentAsException(
const String& methodName);
929 bool CanReadContentAs();
932 String InternalReadContentAsString();
942 static uint32_t s_isTextualNodeBitmap;
943 static uint32_t s_canReadContentAsBitmap;
944 static uint32_t s_hasValueBitmap;
952 bool SetupReadElementContentAsXxx(
const String& methodName);
953 void FinishReadElementContentAsXxx();
Represents a specific date and time value on the time continuum. This type should be allocated on sta...
Definition: date_time.h:50
Contains the date and time of day relative to Coordinated Universal Time. Objects of this class shoul...
Definition: date_time_offset.h:16
Represents a decimal number. This type should be allocated on stack and passed to functions by value ...
Definition: decimal.h:107
Template that represents wrapper of exceptions that are derived from Exception class.
Definition: exception.h:113
Defines method that releases resources owned by the current object. Objects of this class should only...
Definition: idisposable.h:30
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Represents a particular type and provides information about it.
Definition: type_info.h:109
Represents a reader that provides fast, noncached, forward-only access to XML data.
Definition: xml_reader.h:73
virtual bool MoveToAttribute(String name)=0
When overridden in a derived class, moves to the attribute with the specified XmlReader::get_Name val...
virtual void ReadStartElement()
Checks that the current node is an element and advances the reader to the next node.
virtual String ReadInnerXml()
When overridden in a derived class, reads all the content, including markup, as a string.
static SharedPtr< XmlReader > Create(const String &inputUri, SharedPtr< XmlReaderSettings > settings, const SharedPtr< XmlParserContext > &inputContext)
Creates a new XmlReader instance by using the specified URI, settings, and context information for pa...
virtual String ReadElementContentAsString()
Reads the current element and returns the contents as a String object.
virtual String GetAttribute(int32_t i)=0
When overridden in a derived class, gets the value of the attribute with the specified index.
virtual bool IsStartElement(String localname, String ns)
Calls XmlReader::MoveToContent and tests if the current content node is a start tag or empty element ...
virtual bool ReadToDescendant(String localName, String namespaceURI)
Advances the XmlReader to the next descendant element with the specified local name and namespace URI...
static SharedPtr< XmlReader > Create(const SharedPtr< IO::Stream > &input)
Creates a new XmlReader instance using the specified stream with default settings.
virtual bool IsStartElement()
Calls XmlReader::MoveToContent and tests if the current content node is a start tag or empty element ...
virtual TypeInfo get_ValueType()
Returns The type for the current node.
static SharedPtr< XmlReader > Create(const String &inputUri)
Creates a new XmlReader instance with specified URI.
virtual void ResolveEntity()=0
When overridden in a derived class, resolves the entity reference for EntityReference nodes.
virtual SharedPtr< Object > ReadElementContentAs(const TypeInfo &returnType, SharedPtr< IXmlNamespaceResolver > namespaceResolver)
Reads the element content as the requested type.
virtual String ReadElementString()
Reads a text-only element. However, it is recommended to use the XmlReader::ReadElementContentAsStrin...
virtual bool MoveToAttribute(String name, String ns)=0
When overridden in a derived class, moves to the attribute with the specified XmlReader::get_LocalNam...
virtual char16_t get_QuoteChar()
When overridden in a derived class, gets the quotation mark character used to enclose the value of an...
virtual bool ReadContentAsBoolean()
Reads the text content at the current position as a Boolean.
virtual bool IsStartElement(String name)
Calls XmlReader::MoveToContent and tests if the current content node is a start tag or empty element ...
virtual int64_t ReadElementContentAsLong(String localName, String namespaceURI)
Checks that the specified local name and namespace URI matches that of the current element,...
void Dispose() override
Releases all resources used by the current instance of the XmlReader class.
virtual String ReadContentAsString()
Reads the text content at the current position as a String object.
virtual bool ReadToFollowing(String localName, String namespaceURI)
Reads until an element with the specified local name and namespace URI is found.
virtual bool ReadElementContentAsBoolean()
Reads the current element and returns the contents as a Boolean object.
virtual SharedPtr< Object > ReadElementContentAsObject()
Reads the current element and returns the contents as an Object.
static SharedPtr< XmlReader > Create(const SharedPtr< IO::Stream > &input, SharedPtr< XmlReaderSettings > settings, const String &baseUri)
Creates a new XmlReader instance using the specified stream, base URI, and settings.
virtual int32_t get_Depth()=0
When overridden in a derived class, gets the depth of the current node in the XML document.
virtual void Skip()
Skips the children of the current node.
virtual float ReadContentAsFloat()
Reads the text content at the current position as a single-precision floating point number.
static bool IsNameToken(const String &str)
Returns a value indicating whether or not the string argument is a valid XML name token.
virtual bool get_HasAttributes()
Returns a value indicating whether the current node has any attributes.
static SharedPtr< XmlReader > Create(const SharedPtr< IO::TextReader > &input, SharedPtr< XmlReaderSettings > settings, const String &baseUri)
Creates a new XmlReader instance by using the specified text reader, settings, and base URI.
virtual String get_NamespaceURI()=0
When overridden in a derived class, gets the namespace URI (as defined in the W3C Namespace specifica...
virtual DateTime ReadElementContentAsDateTime()
Reads the current element and returns the contents as a DateTime object.
virtual bool ReadAttributeValue()=0
When overridden in a derived class, parses the attribute value into one or more Text,...
virtual double ReadElementContentAsDouble(String localName, String namespaceURI)
Checks that the specified local name and namespace URI matches that of the current element,...
virtual double ReadElementContentAsDouble()
Reads the current element and returns the contents as a double-precision floating-point number.
virtual void MoveToAttribute(int32_t i)
When overridden in a derived class, moves to the attribute with the specified index.
virtual bool get_CanReadBinaryContent()
Returns a value indicating whether the XmlReader implements the binary content read methods.
virtual XmlNodeType get_NodeType()=0
When overridden in a derived class, gets the type of the current node.
virtual void Dispose(bool disposing)
Optionally releases all resources used by the current instance of the XmlReader class.
virtual String get_XmlLang()
When overridden in a derived class, gets the current xml:lang scope.
virtual void ReadStartElement(String localname, String ns)
Checks that the current content node is an element with the given XmlReader::get_LocalName and XmlRea...
virtual XmlNodeType MoveToContent()
Checks whether the current node is a content (non-white space text, CDATA, Element,...
virtual String get_Name()
When overridden in a derived class, gets the qualified name of the current node.
virtual DateTimeOffset ReadContentAsDateTimeOffset()
Reads the text content at the current position as a DateTimeOffset object.
virtual bool get_IsDefault()
When overridden in a derived class, gets a value indicating whether the current node is an attribute ...
virtual double ReadContentAsDouble()
Reads the text content at the current position as a double-precision floating-point number.
virtual float ReadElementContentAsFloat(String localName, String namespaceURI)
Checks that the specified local name and namespace URI matches that of the current element,...
virtual int32_t ReadElementContentAsInt(String localName, String namespaceURI)
Checks that the specified local name and namespace URI matches that of the current element,...
virtual float ReadElementContentAsFloat()
Reads the current element and returns the contents as single-precision floating-point number.
virtual Decimal ReadContentAsDecimal()
Reads the text content at the current position as a Decimal object.
virtual bool get_CanReadValueChunk()
Returns a value indicating whether the XmlReader implements the XmlReader::ReadValueChunk method.
virtual SharedPtr< Object > ReadContentAs(const TypeInfo &returnType, SharedPtr< IXmlNamespaceResolver > namespaceResolver)
Reads the content as an object of the type specified.
virtual bool ReadToFollowing(String name)
Reads until an element with the specified qualified name is found.
virtual System::Xml::XmlSpace get_XmlSpace()
When overridden in a derived class, gets the current xml:space scope.
virtual String ReadElementString(String name)
Checks that the XmlReader::get_Name value of the element found matches the given string before readin...
virtual String GetAttribute(String name)=0
When overridden in a derived class, gets the value of the attribute with the specified XmlReader::get...
virtual SharedPtr< XmlNameTable > get_NameTable()=0
When overridden in a derived class, gets the XmlNameTable associated with this implementation.
virtual void ReadStartElement(String name)
Checks that the current content node is an element with the given XmlReader::get_Name value and advan...
virtual int32_t ReadElementContentAsInt()
Reads the current element and returns the contents as a 32-bit signed integer.
static SharedPtr< XmlReader > Create(const SharedPtr< XmlReader > &reader, SharedPtr< XmlReaderSettings > settings)
Creates a new XmlReader instance by using the specified XML reader and settings.
virtual String idx_get(String name)
When overridden in a derived class, gets the value of the attribute with the specified XmlReader::get...
static SharedPtr< XmlReader > Create(const SharedPtr< IO::TextReader > &input, SharedPtr< XmlReaderSettings > settings, const SharedPtr< XmlParserContext > &inputContext)
Creates a new XmlReader instance by using the specified text reader, settings, and context informatio...
virtual String LookupNamespace(const String &prefix)=0
When overridden in a derived class, resolves a namespace prefix in the current element's scope.
virtual SharedPtr< XmlReaderSettings > get_Settings()
Returns the XmlReaderSettings object used to create this XmlReader instance.
virtual int32_t ReadContentAsBinHex(ArrayPtr< uint8_t > buffer, int32_t index, int32_t count)
Reads the content and returns the BinHex decoded binary bytes.
virtual bool Read()=0
When overridden in a derived class, reads the next node from the stream.
virtual int64_t ReadElementContentAsLong()
Reads the current element and returns the contents as a 64-bit signed integer.
virtual bool get_CanResolveEntity()
Returns a value indicating whether this reader can parse and resolve entities.
virtual bool ReadToNextSibling(String localName, String namespaceURI)
Advances the XmlReader to the next sibling element with the specified local name and namespace URI.
virtual System::Xml::ReadState get_ReadState()=0
When overridden in a derived class, gets the state of the reader.
virtual bool ReadToDescendant(String name)
Advances the XmlReader to the next descendant element with the specified qualified name.
virtual SharedPtr< Object > ReadElementContentAs(const TypeInfo &returnType, SharedPtr< IXmlNamespaceResolver > namespaceResolver, String localName, String namespaceURI)
Checks that the specified local name and namespace URI matches that of the current element,...
virtual SharedPtr< Object > ReadElementContentAsObject(String localName, String namespaceURI)
Checks that the specified local name and namespace URI matches that of the current element,...
virtual int32_t ReadElementContentAsBase64(ArrayPtr< uint8_t > buffer, int32_t index, int32_t count)
Reads the element and decodes the Base64 content.
virtual int32_t get_AttributeCount()=0
When overridden in a derived class, gets the number of attributes on the current node.
virtual Decimal ReadElementContentAsDecimal(String localName, String namespaceURI)
Checks that the specified local name and namespace URI matches that of the current element,...
static bool IsName(const String &str)
Returns a value indicating whether the string argument is a valid XML name.
virtual SharedPtr< Object > ReadContentAsObject()
Reads the text content at the current position as an Object.
virtual int32_t ReadElementContentAsBinHex(ArrayPtr< uint8_t > buffer, int32_t index, int32_t count)
Reads the element and decodes the BinHex content.
static SharedPtr< XmlReader > Create(const SharedPtr< IO::TextReader > &input)
Creates a new XmlReader instance by using the specified text reader.
virtual Decimal ReadElementContentAsDecimal()
Reads the current element and returns the contents as a Decimal object.
virtual String get_Value()=0
When overridden in a derived class, gets the text value of the current node.
static SharedPtr< XmlReader > Create(const SharedPtr< IO::TextReader > &input, const SharedPtr< XmlReaderSettings > &settings)
Creates a new XmlReader instance by using the specified text reader and settings.
virtual int32_t ReadContentAsBase64(ArrayPtr< uint8_t > buffer, int32_t index, int32_t count)
Reads the content and returns the Base64 decoded binary bytes.
virtual SharedPtr< Schema::IXmlSchemaInfo > get_SchemaInfo()
Returns the schema information that has been assigned to the current node as a result of schema valid...
virtual int32_t ReadValueChunk(ArrayPtr< char16_t > buffer, int32_t index, int32_t count)
Reads large streams of text embedded in an XML document.
virtual String idx_get(int32_t i)
When overridden in a derived class, gets the value of the attribute with the specified index.
virtual String get_LocalName()=0
When overridden in a derived class, gets the local name of the current node.
virtual bool get_HasValue()
When overridden in a derived class, gets a value indicating whether the current node can have a XmlRe...
virtual bool get_EOF()=0
When overridden in a derived class, gets a value indicating whether the reader is positioned at the e...
virtual bool MoveToFirstAttribute()=0
When overridden in a derived class, moves to the first attribute.
virtual bool MoveToNextAttribute()=0
When overridden in a derived class, moves to the next attribute.
static SharedPtr< XmlReader > Create(const SharedPtr< IO::Stream > &input, SharedPtr< XmlReaderSettings > settings, const SharedPtr< XmlParserContext > &inputContext)
Creates a new XmlReader instance using the specified stream, settings, and context information for pa...
static SharedPtr< XmlReader > Create(const String &inputUri, const SharedPtr< XmlReaderSettings > &settings)
Creates a new XmlReader instance by using the specified URI and settings.
virtual bool ReadElementContentAsBoolean(String localName, String namespaceURI)
Checks that the specified local name and namespace URI matches that of the current element,...
virtual SharedPtr< XmlReader > ReadSubtree()
Returns a new XmlReader instance that can be used to read the current node, and all its descendants.
virtual bool MoveToElement()=0
When overridden in a derived class, moves to the element that contains the current attribute node.
virtual String GetAttribute(String name, String namespaceURI)=0
When overridden in a derived class, gets the value of the attribute with the specified XmlReader::get...
virtual bool ReadToNextSibling(String name)
Advances the XmlReader to the next sibling element with the specified qualified name.
virtual String ReadOuterXml()
When overridden in a derived class, reads the content, including markup, representing this node and a...
virtual String ReadElementContentAsString(String localName, String namespaceURI)
Checks that the specified local name and namespace URI matches that of the current element,...
virtual String idx_get(String name, String namespaceURI)
When overridden in a derived class, gets the value of the attribute with the specified XmlReader::get...
static SharedPtr< XmlReader > Create(const SharedPtr< IO::Stream > &input, const SharedPtr< XmlReaderSettings > &settings)
Creates a new XmlReader instance with the specified stream and settings.
virtual bool get_IsEmptyElement()=0
When overridden in a derived class, gets a value indicating whether the current node is an empty elem...
virtual String ReadString()
When overridden in a derived class, reads the contents of an element or text node as a string....
virtual String ReadElementString(String localname, String ns)
Checks that the XmlReader::get_LocalName and XmlReader::get_NamespaceURI values of the element found ...
virtual int32_t ReadContentAsInt()
Reads the text content at the current position as a 32-bit signed integer.
virtual int64_t ReadContentAsLong()
Reads the text content at the current position as a 64-bit signed integer.
virtual String get_Prefix()=0
When overridden in a derived class, gets the namespace prefix associated with the current node.
virtual void Close()
When overridden in a derived class, changes the XmlReader::get_ReadState to ReadState::Closed.
virtual String get_BaseURI()=0
When overridden in a derived class, gets the base URI of the current node.
virtual DateTime ReadContentAsDateTime()
Reads the text content at the current position as a DateTime object.
virtual DateTime ReadElementContentAsDateTime(String localName, String namespaceURI)
Checks that the specified local name and namespace URI matches that of the current element,...
virtual void ReadEndElement()
Checks that the current content node is an end tag and advances the reader to the next node.
Specifies a set of features to support on the XmlReader object created by the XmlReader::Create metho...
Definition: xml_reader_settings.h:57
Represents a writer that provides a fast, non-cached, forward-only way to generate streams or files t...
Definition: xml_writer.h:45
@ Stream
The type that supports reliable, two-way, connection-based byte streams without duplication of data a...
@ TypeInfo
Specifies that the member is a type.
XmlSpace
Specifies the current xml:space scope.
Definition: xml_space.h:15
ConformanceLevel
Specifies the amount of input or output checking that XmlReader and XmlWriter objects perform.
Definition: conformance_level.h:15
@ Schema
Validate according to XML Schema definition language (XSD) schemas, including inline XML Schemas....
@ Xml
Serialize according to the XML 1.0 rules.
ReadState
Specifies the state of the reader.
Definition: read_state.h:15
XmlNodeType
Specifies the type of node.
Definition: xml_node_type.h:15
Definition: db_command.h:9
@ DateTime
A type representing a date and time value.
@ Decimal
A simple type representing values ranging from 1.0 x 10 -28 to approximately 7.9 x 10 28 with 28-29 s...