RLib  5.7
RLib - an opensource, lightweight and multi-platform framework for cpp programming
System::Xml::XmlBase Class Referenceabstract

XmlBase is a base class for every class in TinyXml. It does little except to establish that TinyXml classes can be printed and provide some utility functions. More...

Inheritance diagram for System::Xml::XmlBase:
System::Xml::XmlAttribute System::Xml::XmlNode System::Xml::XmlComment System::Xml::XmlDeclaration System::Xml::XmlDocument System::Xml::XmlElement System::Xml::XmlText System::Xml::XmlUnknown

Public Types

enum  {
  RLIBXML_NO_ERROR = 0, RLIBXML_ERROR, RLIBXML_ERROR_OPENING_FILE, RLIBXML_ERROR_READING_STREAM,
  RLIBXML_ERROR_PARSING_ELEMENT, RLIBXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, RLIBXML_ERROR_READING_ELEMENT_VALUE, RLIBXML_ERROR_READING_ATTRIBUTES,
  RLIBXML_ERROR_PARSING_EMPTY, RLIBXML_ERROR_READING_END_TAG, RLIBXML_ERROR_PARSING_UNKNOWN, RLIBXML_ERROR_PARSING_COMMENT,
  RLIBXML_ERROR_PARSING_DECLARATION, RLIBXML_ERROR_DOCUMENT_EMPTY, RLIBXML_ERROR_EMBEDDED_NULL, RLIBXML_ERROR_PARSING_CDATA,
  RLIBXML_ERROR_DOCUMENT_TOP_ONLY, RLIBXML_ERROR_MEMORY_NOT_ENOUGH, RLIBXML_ERROR_STRING_COUNT
}
 

Public Member Functions

virtual void Print (IO::Stream *cfile, int depth) const =0
 
int Row () const
 
int Column () const
 See Row()
 
void SetUserData (void *user)
 Set a pointer to arbitrary user data.
 
void * GetUserData ()
 Get a pointer to arbitrary user data.
 
const void * GetUserData () const
 Get a pointer to arbitrary user data.
 
virtual const TCHAR * Parse (const TCHAR *p, XmlParsingData *data)=0
 

Static Public Member Functions

static void SetCondenseWhiteSpace (bool condense)
 
static bool IsWhiteSpaceCondensed ()
 Return the current white space setting.
 
static void EncodeString (const String &str, String *out)
 

Static Protected Member Functions

static const TCHAR * SkipWhiteSpace (const TCHAR *)
 
static RLIB_INLINE bool IsWhiteSpace (TCHAR c)
 
static RLIB_INLINE bool IsWhiteSpace (int c)
 
static const TCHAR * ReadName (const TCHAR *p, String *name)
 
static const TCHAR * ReadText (const TCHAR *in, String *text, bool ignoreWhiteSpace, const TCHAR *endTag, bool ignoreCase)
 
static const TCHAR * GetEntity (const TCHAR *in, TCHAR *value, int *length)
 
static RLIB_INLINE const TCHAR * GetChar (const TCHAR *p, TCHAR *_value, int *length)
 
static bool StringEqual (const TCHAR *p, const TCHAR *endTag, bool ignoreCase)
 
static int IsAlpha (TCHAR anyByte)
 
static int IsAlphaNum (TCHAR anyByte)
 
static RLIB_INLINE int ToLower (int v)
 

Protected Attributes

XmlCursor location
 
void * userData
 Field containing a generic user pointer.
 

Friends

class RLIB_API XmlNode
 
class RLIB_API XmlElement
 
class RLIB_API XmlDocument
 

Detailed Description

XmlBase is a base class for every class in TinyXml. It does little except to establish that TinyXml classes can be printed and provide some utility functions.

In XML, the document and elements can contain other elements and other types of nodes.

/// A Document can contain: Element (container or leaf)
/// Comment (leaf)
/// Unknown (leaf)
/// Declaration( leaf )
/// 
/// An Element can contain: Element (container or leaf)
/// Text    (leaf)
/// Attributes (not on tree)
/// Comment (leaf)
/// Unknown (leaf)
/// 
/// A Decleration contains: Attributes (not on tree)
/// 

The documentation for this class was generated from the following files: