API Guides > ConceptRT 3.x
XmlReader Class Reference

Xml reader. More...

Detailed Description

Xml reader.

Public Member Methods

 XmlReader (Stream &stream)
 Constructor. More...
 
 XmlReader (TextReader &reader)
 Constructor. More...
 
virtual ~XmlReader ()
 Destructor. More...
 
bool IsOpenMarkup ()
 Query if the next element to read is an open markup. More...
 
bool IsOpenMarkup (PCChar8 markup)
 Query if the next element to read is an open markup with the name 'markup'. More...
 
bool PeekOpenMarkup (String &markup)
 Peek open markup. More...
 
bool IsCloseMarkup ()
 Query if the next element to read is a close markup. More...
 
bool IsCloseMarkup (PCChar8 markup)
 Query if the next element to read is a close markup with the name 'markup'. More...
 
void PeekCloseMarkup (String &markup)
 Peek close markup. More...
 
bool ReadOpenMarkup (PCChar8 markup)
 Reads an open markup. More...
 
void ReadCloseMarkup (PCChar8 markup)
 Reads a close markup. Throw exception on failure. More...
 
void ReadInnerValue (BaseStaticString &value)
 Reads a inner value. Throw exception if Markup wasn't Read. More...
 
void ReadValue (PCChar8 markup, BaseStaticString &value)
 Reads a value. Throw exception on failure. More...
 
void ReadValue (PCChar8 markup, IStringConvertible &value)
 Reads a value. Throw exception on failure. More...
 
void ReadValue (PCChar8 markup, bool &value)
 Reads a value. Throw exception on failure. More...
 
void ReadValue (PCChar8 markup, Int16 &value)
 Reads a value. Throw exception on failure. More...
 
void ReadValue (PCChar8 markup, UInt16 &value)
 Reads a value. Throw exception on failure. More...
 
void ReadValue (PCChar8 markup, Int32 &value)
 Reads a value. Throw exception on failure. More...
 
void ReadValue (PCChar8 markup, UInt32 &value)
 Reads a value. Throw exception on failure. More...
 
void ReadValue (PCChar8 markup, Int64 &value)
 Reads a value. Throw exception on failure. More...
 
void ReadValue (PCChar8 markup, UInt64 &value)
 Reads a value. Throw exception on failure. More...
 
void ReadValue (PCChar8 markup, Float32 &value)
 Reads a value. Throw exception on failure. More...
 
void ReadValue (PCChar8 markup, Float64 &value)
 Reads a value. Throw exception on failure. More...
 
bool EndOfStream ()
 Query if end an of stream reached. More...
 
TextReaderGetTextReader ()
 Gets the text reader. More...
 

Constructor & Destructor Documentation

XmlReader ( Stream stream)

Constructor.

Parameters
stream[in,out] The stream.
XmlReader ( TextReader reader)

Constructor.

Parameters
reader[in,out] The reader.
virtual ~XmlReader ( )
inlinevirtual

Destructor.

Methods Documentation

bool EndOfStream ( )

Query if end an of stream reached.

Returns
true if reached.
TextReader& GetTextReader ( )

Gets the text reader.

Returns
The text reader.
bool IsCloseMarkup ( )

Query if the next element to read is a close markup.

Returns
true if close markup, false if not.
bool IsCloseMarkup ( PCChar8  markup)

Query if the next element to read is a close markup with the name 'markup'.

Parameters
markupThe markup name.
Returns
true if close markup, false if not.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
bool IsOpenMarkup ( )

Query if the next element to read is an open markup.

Returns
true if open markup, false if not.
bool IsOpenMarkup ( PCChar8  markup)

Query if the next element to read is an open markup with the name 'markup'.

Parameters
markupThe markup name.
Returns
true if open markup, false if not.
void PeekCloseMarkup ( String markup)

Peek close markup.

Parameters
markup[in,out] The markup name.
bool PeekOpenMarkup ( String markup)

Peek open markup.

Parameters
markup[in,out] The markup name.
Returns
true if it succeeds, false if it fails.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
void ReadCloseMarkup ( PCChar8  markup)

Reads a close markup. Throw exception on failure.

Parameters
markupThe markup name.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
void ReadInnerValue ( BaseStaticString value)

Reads a inner value. Throw exception if Markup wasn't Read.

Parameters
value[in,out] The value.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
bool ReadOpenMarkup ( PCChar8  markup)

Reads an open markup.

Parameters
markupThe markup name.
Returns
true if the markup value is not empty, false if it is like <markup&gt;. Throw exception on failure.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
void ReadValue ( PCChar8  markup,
BaseStaticString value 
)

Reads a value. Throw exception on failure.

Parameters
markupThe markup name.
value[in,out] The value.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
void ReadValue ( PCChar8  markup,
IStringConvertible value 
)

Reads a value. Throw exception on failure.

Parameters
markupThe markup name.
value[in,out] The value.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
void ReadValue ( PCChar8  markup,
bool &  value 
)

Reads a value. Throw exception on failure.

Parameters
markupThe markup name.
value[in,out] The value.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
void ReadValue ( PCChar8  markup,
Int16 value 
)

Reads a value. Throw exception on failure.

Parameters
markupThe markup name.
value[in,out] The value.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
void ReadValue ( PCChar8  markup,
UInt16 value 
)

Reads a value. Throw exception on failure.

Parameters
markupThe markup name.
value[in,out] The value.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
void ReadValue ( PCChar8  markup,
Int32 value 
)

Reads a value. Throw exception on failure.

Parameters
markupThe markup name.
value[in,out] The value.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
void ReadValue ( PCChar8  markup,
UInt32 value 
)

Reads a value. Throw exception on failure.

Parameters
markupThe markup name.
value[in,out] The value.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
void ReadValue ( PCChar8  markup,
Int64 value 
)

Reads a value. Throw exception on failure.

Parameters
markupThe markup name.
value[in,out] The value.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
void ReadValue ( PCChar8  markup,
UInt64 value 
)

Reads a value. Throw exception on failure.

Parameters
markupThe markup name.
value[in,out] The value.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
void ReadValue ( PCChar8  markup,
Float32 value 
)

Reads a value. Throw exception on failure.

Parameters
markupThe markup name.
value[in,out] The value.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD
void ReadValue ( PCChar8  markup,
Float64 value 
)

Reads a value. Throw exception on failure.

Parameters
markupThe markup name.
value[in,out] The value.
RT Exceptions:
RT_ERROR_XML_DESERIALIZATION_FAILD