CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
xml_reader.h
1
2
3#pragma once
4
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>
11#include <cstdint>
12
13
15namespace System
16{
17class DateTime;
18class DateTimeOffset;
19class Decimal;
20namespace IO
21{
22class Stream;
23class StringWriter;
24class TextReader;
25} // namespace IO
26class TypeInfo;
27namespace Xml
28{
29enum class ConformanceLevel;
30class IDtdInfo;
31class IXmlLineInfo;
32class IXmlNamespaceResolver;
33class ReadContentAsBinaryHelper;
34namespace Schema
35{
36class IXmlSchemaInfo;
37class Parser;
38} // namespace Schema
39class XmlLoader;
40class XmlNamespaceManager;
41class XmlNameTable;
42class XmlParserContext;
43class XmlReaderSettings;
44class XmlSqlBinaryReader;
45class XmlSubtreeReader;
46class XmlTextReaderImpl;
47class XmlTextWriter;
48class XmlWrappingReader;
49class XmlWriter;
50namespace XPath
51{
52class XPathDocumentImpl;
53} // namespace XPath
54class XsdCachingReader;
55class XsdValidatingReader;
56namespace Xsl
57{
58namespace XsltOld
59{
60class ReaderOutput;
61} // namespace XsltOld
62} // namespace Xsl
63} // namespace Xml
64} // namespace System
66
67namespace System {
68
69namespace Xml {
70
72class ASPOSECPP_SHARED_CLASS XmlReader : public IDisposable
73{
74 typedef XmlReader ThisType;
75 typedef IDisposable BaseType;
76
77 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
78 ASPOSECPP_SHARED_RTTI_INFO_DECL();
79
80public:
81
84
85private:
87 friend class XmlSqlBinaryReader;
88 friend class XmlWriter;
89 friend class ReadContentAsBinaryHelper;
90 friend class XmlWrappingReader;
91 friend class XmlReaderSettings;
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;
101
102public:
103
107 virtual ASPOSECPP_SHARED_API SharedPtr<XmlReaderSettings> get_Settings();
110 virtual ASPOSECPP_SHARED_API XmlNodeType get_NodeType() = 0;
126 virtual ASPOSECPP_SHARED_API String get_Name();
131 virtual ASPOSECPP_SHARED_API String get_LocalName() = 0;
135 virtual ASPOSECPP_SHARED_API String get_NamespaceURI() = 0;
138 virtual ASPOSECPP_SHARED_API String get_Prefix() = 0;
142 virtual ASPOSECPP_SHARED_API bool get_HasValue();
159 virtual ASPOSECPP_SHARED_API String get_Value() = 0;
162 virtual ASPOSECPP_SHARED_API int32_t get_Depth() = 0;
165 virtual ASPOSECPP_SHARED_API String get_BaseURI() = 0;
170 virtual ASPOSECPP_SHARED_API bool get_IsEmptyElement() = 0;
175 virtual ASPOSECPP_SHARED_API bool get_IsDefault();
178 virtual ASPOSECPP_SHARED_API char16_t get_QuoteChar();
181 virtual ASPOSECPP_SHARED_API System::Xml::XmlSpace get_XmlSpace();
184 virtual ASPOSECPP_SHARED_API String get_XmlLang();
192 virtual ASPOSECPP_SHARED_API SharedPtr<Schema::IXmlSchemaInfo> get_SchemaInfo();
195 virtual ASPOSECPP_SHARED_API TypeInfo get_ValueType();
198 virtual ASPOSECPP_SHARED_API int32_t get_AttributeCount() = 0;
201 virtual ASPOSECPP_SHARED_API bool get_EOF() = 0;
204 virtual ASPOSECPP_SHARED_API System::Xml::ReadState get_ReadState() = 0;
207 virtual ASPOSECPP_SHARED_API SharedPtr<XmlNameTable> get_NameTable() = 0;
210 virtual ASPOSECPP_SHARED_API bool get_CanResolveEntity();
213 virtual ASPOSECPP_SHARED_API bool get_CanReadBinaryContent();
216 virtual ASPOSECPP_SHARED_API bool get_CanReadValueChunk();
219 virtual ASPOSECPP_SHARED_API bool get_HasAttributes();
220
225 virtual ASPOSECPP_SHARED_API SharedPtr<Object> ReadContentAsObject();
230 virtual ASPOSECPP_SHARED_API bool ReadContentAsBoolean();
235 virtual ASPOSECPP_SHARED_API DateTime ReadContentAsDateTime();
238 virtual ASPOSECPP_SHARED_API DateTimeOffset ReadContentAsDateTimeOffset();
243 virtual ASPOSECPP_SHARED_API double ReadContentAsDouble();
248 virtual ASPOSECPP_SHARED_API float ReadContentAsFloat();
253 virtual ASPOSECPP_SHARED_API Decimal ReadContentAsDecimal();
258 virtual ASPOSECPP_SHARED_API int32_t ReadContentAsInt();
263 virtual ASPOSECPP_SHARED_API int64_t ReadContentAsLong();
268 virtual ASPOSECPP_SHARED_API String ReadContentAsString();
280 virtual ASPOSECPP_SHARED_API SharedPtr<Object> ReadContentAs(const TypeInfo& returnType, SharedPtr<IXmlNamespaceResolver> namespaceResolver);
289 virtual ASPOSECPP_SHARED_API SharedPtr<Object> ReadElementContentAsObject();
302 virtual ASPOSECPP_SHARED_API SharedPtr<Object> ReadElementContentAsObject(String localName, String namespaceURI);
309 virtual ASPOSECPP_SHARED_API bool ReadElementContentAsBoolean();
320 virtual ASPOSECPP_SHARED_API bool ReadElementContentAsBoolean(String localName, String namespaceURI);
327 virtual ASPOSECPP_SHARED_API DateTime ReadElementContentAsDateTime();
338 virtual ASPOSECPP_SHARED_API DateTime ReadElementContentAsDateTime(String localName, String namespaceURI);
345 virtual ASPOSECPP_SHARED_API double ReadElementContentAsDouble();
356 virtual ASPOSECPP_SHARED_API double ReadElementContentAsDouble(String localName, String namespaceURI);
363 virtual ASPOSECPP_SHARED_API float ReadElementContentAsFloat();
374 virtual ASPOSECPP_SHARED_API float ReadElementContentAsFloat(String localName, String namespaceURI);
381 virtual ASPOSECPP_SHARED_API Decimal ReadElementContentAsDecimal();
392 virtual ASPOSECPP_SHARED_API Decimal ReadElementContentAsDecimal(String localName, String namespaceURI);
398 virtual ASPOSECPP_SHARED_API int32_t ReadElementContentAsInt();
409 virtual ASPOSECPP_SHARED_API int32_t ReadElementContentAsInt(String localName, String namespaceURI);
416 virtual ASPOSECPP_SHARED_API int64_t ReadElementContentAsLong();
427 virtual ASPOSECPP_SHARED_API int64_t ReadElementContentAsLong(String localName, String namespaceURI);
434 virtual ASPOSECPP_SHARED_API String ReadElementContentAsString();
445 virtual ASPOSECPP_SHARED_API String ReadElementContentAsString(String localName, String namespaceURI);
455 virtual ASPOSECPP_SHARED_API SharedPtr<Object> ReadElementContentAs(const TypeInfo& returnType, SharedPtr<IXmlNamespaceResolver> namespaceResolver);
469 virtual ASPOSECPP_SHARED_API SharedPtr<Object> ReadElementContentAs(const TypeInfo& returnType, SharedPtr<IXmlNamespaceResolver> namespaceResolver, String localName, String namespaceURI);
475 virtual ASPOSECPP_SHARED_API String GetAttribute(String name) = 0;
484 virtual ASPOSECPP_SHARED_API String GetAttribute(String name, String namespaceURI) = 0;
490 virtual ASPOSECPP_SHARED_API String GetAttribute(int32_t i) = 0;
491
495 virtual ASPOSECPP_SHARED_API String idx_get(int32_t i);
499 virtual ASPOSECPP_SHARED_API String idx_get(String name);
505 virtual ASPOSECPP_SHARED_API String idx_get(String name, String namespaceURI);
506
511 virtual ASPOSECPP_SHARED_API bool MoveToAttribute(String name) = 0;
518 virtual ASPOSECPP_SHARED_API bool MoveToAttribute(String name, String ns) = 0;
522 virtual ASPOSECPP_SHARED_API void MoveToAttribute(int32_t i);
526 virtual ASPOSECPP_SHARED_API bool MoveToFirstAttribute() = 0;
529 virtual ASPOSECPP_SHARED_API bool MoveToNextAttribute() = 0;
533 virtual ASPOSECPP_SHARED_API bool MoveToElement() = 0;
538 virtual ASPOSECPP_SHARED_API bool ReadAttributeValue() = 0;
542 virtual ASPOSECPP_SHARED_API bool Read() = 0;
544 virtual ASPOSECPP_SHARED_API void Close();
546 virtual ASPOSECPP_SHARED_API void Skip();
550 virtual ASPOSECPP_SHARED_API String LookupNamespace(const String& prefix) = 0;
554 virtual ASPOSECPP_SHARED_API void ResolveEntity() = 0;
565 virtual ASPOSECPP_SHARED_API int32_t ReadContentAsBase64(ArrayPtr<uint8_t> buffer, int32_t index, int32_t count);
578 virtual ASPOSECPP_SHARED_API int32_t ReadElementContentAsBase64(ArrayPtr<uint8_t> buffer, int32_t index, int32_t count);
589 virtual ASPOSECPP_SHARED_API int32_t ReadContentAsBinHex(ArrayPtr<uint8_t> buffer, int32_t index, int32_t count);
602 virtual ASPOSECPP_SHARED_API int32_t ReadElementContentAsBinHex(ArrayPtr<uint8_t> buffer, int32_t index, int32_t count);
616 virtual ASPOSECPP_SHARED_API int32_t ReadValueChunk(ArrayPtr<char16_t> buffer, int32_t index, int32_t count);
622 virtual ASPOSECPP_SHARED_API String ReadString();
629 virtual ASPOSECPP_SHARED_API XmlNodeType MoveToContent();
632 virtual ASPOSECPP_SHARED_API void ReadStartElement();
638 virtual ASPOSECPP_SHARED_API void ReadStartElement(String name);
645 virtual ASPOSECPP_SHARED_API void ReadStartElement(String localname, String ns);
652 virtual ASPOSECPP_SHARED_API String ReadElementString();
661 virtual ASPOSECPP_SHARED_API String ReadElementString(String name);
672 virtual ASPOSECPP_SHARED_API String ReadElementString(String localname, String ns);
675 virtual ASPOSECPP_SHARED_API void ReadEndElement();
680 virtual ASPOSECPP_SHARED_API bool IsStartElement();
688 virtual ASPOSECPP_SHARED_API bool IsStartElement(String name);
697 virtual ASPOSECPP_SHARED_API bool IsStartElement(String localname, String ns);
703 virtual ASPOSECPP_SHARED_API bool ReadToFollowing(String name);
710 virtual ASPOSECPP_SHARED_API bool ReadToFollowing(String localName, String namespaceURI);
719 virtual ASPOSECPP_SHARED_API bool ReadToDescendant(String name);
729 virtual ASPOSECPP_SHARED_API bool ReadToDescendant(String localName, String namespaceURI);
736 virtual ASPOSECPP_SHARED_API bool ReadToNextSibling(String name);
744 virtual ASPOSECPP_SHARED_API bool ReadToNextSibling(String localName, String namespaceURI);
749 static ASPOSECPP_SHARED_API bool IsName(const String& str);
754 static ASPOSECPP_SHARED_API bool IsNameToken(const String& str);
760 virtual ASPOSECPP_SHARED_API String ReadInnerXml();
765 virtual ASPOSECPP_SHARED_API String ReadOuterXml();
771 virtual ASPOSECPP_SHARED_API SharedPtr<XmlReader> ReadSubtree();
773 ASPOSECPP_SHARED_API void Dispose() override;
782 static ASPOSECPP_SHARED_API SharedPtr<XmlReader> Create(const String& inputUri);
792 static ASPOSECPP_SHARED_API SharedPtr<XmlReader> Create(const String& inputUri, const SharedPtr<XmlReaderSettings>& settings);
809 static ASPOSECPP_SHARED_API SharedPtr<XmlReader> Create(const String& inputUri, SharedPtr<XmlReaderSettings> settings, const SharedPtr<XmlParserContext>& inputContext);
818 static ASPOSECPP_SHARED_API SharedPtr<XmlReader> Create(const SharedPtr<IO::Stream>& input);
827 static ASPOSECPP_SHARED_API SharedPtr<XmlReader> Create(const SharedPtr<IO::Stream>& input, const SharedPtr<XmlReaderSettings>& settings);
839 static ASPOSECPP_SHARED_API SharedPtr<XmlReader> Create(const SharedPtr<IO::Stream>& input, SharedPtr<XmlReaderSettings> settings, const String& baseUri);
852 static ASPOSECPP_SHARED_API SharedPtr<XmlReader> Create(const SharedPtr<IO::Stream>& input, SharedPtr<XmlReaderSettings> settings, const SharedPtr<XmlParserContext>& inputContext);
859 static ASPOSECPP_SHARED_API SharedPtr<XmlReader> Create(const SharedPtr<IO::TextReader>& input);
867 static ASPOSECPP_SHARED_API SharedPtr<XmlReader> Create(const SharedPtr<IO::TextReader>& input, const SharedPtr<XmlReaderSettings>& settings);
878 static ASPOSECPP_SHARED_API SharedPtr<XmlReader> Create(const SharedPtr<IO::TextReader>& input, SharedPtr<XmlReaderSettings> settings, const String& baseUri);
892 static ASPOSECPP_SHARED_API SharedPtr<XmlReader> Create(const SharedPtr<IO::TextReader>& input, SharedPtr<XmlReaderSettings> settings, const SharedPtr<XmlParserContext>& inputContext);
903 static ASPOSECPP_SHARED_API SharedPtr<XmlReader> Create(const SharedPtr<XmlReader>& reader, SharedPtr<XmlReaderSettings> settings);
904
905protected:
906
908 static const int32_t DefaultBufferSize;
909 static const int32_t BiggerBufferSize;
910 static const int32_t MaxStreamLengthForDefaultBufferSize;
911 static const int32_t AsyncBufferSize;
912
913 virtual ASPOSECPP_SHARED_API SharedPtr<XmlNamespaceManager> get_NamespaceManager();
914 bool get_IsDefaultInternal();
915 virtual ASPOSECPP_SHARED_API SharedPtr<IDtdInfo> get_DtdInfo();
917
920 virtual ASPOSECPP_SHARED_API void Dispose(bool disposing);
921
923 static bool IsTextualNode(XmlNodeType nodeType);
924 static bool CanReadContentAs(XmlNodeType nodeType);
925 static bool HasValueInternal(XmlNodeType nodeType);
926 void CheckElement(const String& localName, const String& namespaceURI);
927 Exception CreateReadContentAsException(const String& methodName);
928 Exception CreateReadElementContentAsException(const String& methodName);
929 bool CanReadContentAs();
930 static Exception CreateReadContentAsException(const String& methodName, XmlNodeType nodeType, const SharedPtr<IXmlLineInfo>& lineInfo);
931 static Exception CreateReadElementContentAsException(const String& methodName, XmlNodeType nodeType, const SharedPtr<IXmlLineInfo>& lineInfo);
932 String InternalReadContentAsString();
933 static ConformanceLevel GetV1ConformanceLevel(const SharedPtr<XmlReader>& reader);
934 static SharedPtr<XmlReader> CreateSqlReader(const SharedPtr<IO::Stream>& input, SharedPtr<XmlReaderSettings> settings, const SharedPtr<XmlParserContext>& inputContext);
935 static int32_t CalcBufferSize(const SharedPtr<IO::Stream>& input);
937
938 virtual ASPOSECPP_SHARED_API ~XmlReader();
939
940private:
941
942 static uint32_t s_isTextualNodeBitmap;
943 static uint32_t s_canReadContentAsBitmap;
944 static uint32_t s_hasValueBitmap;
945
946 void WriteNode(const SharedPtr<XmlWriter>& xtw, bool defattr);
947 void WriteAttributeValue(const SharedPtr<XmlWriter>& xtw);
948 SharedPtr<XmlWriter> CreateWriterForInnerOuterXml(const SharedPtr<IO::StringWriter>& sw);
949 void SetNamespacesFlag(const SharedPtr<XmlTextWriter>& xtw);
950 bool SkipSubtree();
951 static String AddLineInfo(String message, const SharedPtr<IXmlLineInfo>& lineInfo);
952 bool SetupReadElementContentAsXxx(const String& methodName);
953 void FinishReadElementContentAsXxx();
954 static SharedPtr<XmlTextReaderImpl> GetXmlTextReaderImpl(const SharedPtr<XmlReader>& reader);
955
956};
957
958} // namespace Xml
959} // namespace System
960
961
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...