edelib  2.0.0
Public Member Functions
TiXmlDeclaration Class Reference

XML declaration. More...

#include <edelib/TiXml.h>

Inheritance diagram for TiXmlDeclaration:
TiXmlNode TiXmlBase

List of all members.

Public Member Functions

 TiXmlDeclaration ()
 TiXmlDeclaration (const char *_version, const char *_encoding, const char *_standalone)
 TiXmlDeclaration (const TiXmlDeclaration &copy)
void operator= (const TiXmlDeclaration &copy)
const char * Version () const
const char * Encoding () const
const char * Standalone () const
virtual TiXmlNode * Clone () const
virtual void Print (FILE *cfile, int depth, edelib::String *str) const
virtual void Print (FILE *cfile, int depth) const
virtual const TiXmlDeclaration * ToDeclaration () const
virtual TiXmlDeclaration * ToDeclaration ()
virtual bool Accept (TiXmlVisitor *visitor) const
- Public Member Functions inherited from TiXmlNode
const char * Value () const
void SetValue (const char *_value)
void Clear ()
TiXmlNode * Parent ()
const TiXmlNode * Parent () const
const TiXmlNode * FirstChild () const
TiXmlNode * FirstChild ()
const TiXmlNode * FirstChild (const char *value) const
TiXmlNode * FirstChild (const char *_value)
const TiXmlNode * LastChild () const
TiXmlNode * LastChild ()
const TiXmlNode * LastChild (const char *value) const
TiXmlNode * LastChild (const char *_value)
const TiXmlNode * IterateChildren (const TiXmlNode *previous) const
TiXmlNode * IterateChildren (const TiXmlNode *previous)
const TiXmlNode * IterateChildren (const char *value, const TiXmlNode *previous) const
TiXmlNode * IterateChildren (const char *_value, const TiXmlNode *previous)
TiXmlNode * InsertEndChild (const TiXmlNode &addThis)
TiXmlNode * LinkEndChild (TiXmlNode *addThis)
TiXmlNode * InsertBeforeChild (TiXmlNode *beforeThis, const TiXmlNode &addThis)
TiXmlNode * InsertAfterChild (TiXmlNode *afterThis, const TiXmlNode &addThis)
TiXmlNode * ReplaceChild (TiXmlNode *replaceThis, const TiXmlNode &withThis)
bool RemoveChild (TiXmlNode *removeThis)
const TiXmlNode * PreviousSibling () const
TiXmlNode * PreviousSibling ()
const TiXmlNode * PreviousSibling (const char *) const
TiXmlNode * PreviousSibling (const char *_prev)
const TiXmlNode * NextSibling () const
TiXmlNode * NextSibling ()
const TiXmlNode * NextSibling (const char *) const
TiXmlNode * NextSibling (const char *_next)
const TiXmlElement * NextSiblingElement () const
TiXmlElement * NextSiblingElement ()
const TiXmlElement * NextSiblingElement (const char *) const
TiXmlElement * NextSiblingElement (const char *_next)
const TiXmlElement * FirstChildElement () const
TiXmlElement * FirstChildElement ()
const TiXmlElement * FirstChildElement (const char *_value) const
TiXmlElement * FirstChildElement (const char *_value)
int Type () const
const TiXmlDocument * GetDocument () const
TiXmlDocument * GetDocument ()
bool NoChildren () const
virtual const TiXmlDocument * ToDocument () const
virtual const TiXmlElement * ToElement () const
virtual const TiXmlComment * ToComment () const
virtual const TiXmlUnknown * ToUnknown () const
virtual const TiXmlText * ToText () const
virtual TiXmlDocument * ToDocument ()
virtual TiXmlElement * ToElement ()
virtual TiXmlComment * ToComment ()
virtual TiXmlUnknown * ToUnknown ()
virtual TiXmlText * ToText ()
- Public Member Functions inherited from TiXmlBase
int Row () const
int Column () const
void SetUserData (void *user)
void * GetUserData ()
const void * GetUserData () const

Additional Inherited Members

- Public Types inherited from TiXmlNode
enum  NodeType {
  DOCUMENT, ELEMENT, COMMENT, UNKNOWN,
  TEXT, DECLARATION, TYPECOUNT
}
- Public Types inherited from TiXmlBase
enum  {
  TIXML_NO_ERROR = 0, TIXML_ERROR, TIXML_ERROR_OPENING_FILE, TIXML_ERROR_OUT_OF_MEMORY,
  TIXML_ERROR_PARSING_ELEMENT, TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, TIXML_ERROR_READING_ELEMENT_VALUE, TIXML_ERROR_READING_ATTRIBUTES,
  TIXML_ERROR_PARSING_EMPTY, TIXML_ERROR_READING_END_TAG, TIXML_ERROR_PARSING_UNKNOWN, TIXML_ERROR_PARSING_COMMENT,
  TIXML_ERROR_PARSING_DECLARATION, TIXML_ERROR_DOCUMENT_EMPTY, TIXML_ERROR_EMBEDDED_NULL, TIXML_ERROR_PARSING_CDATA,
  TIXML_ERROR_DOCUMENT_TOP_ONLY, TIXML_ERROR_STRING_COUNT
}
- Protected Member Functions inherited from TiXmlNode
 TiXmlNode (NodeType _type)
void CopyTo (TiXmlNode *target) const
TiXmlNode * Identify (const char *start, TiXmlEncoding encoding)

Detailed Description

XML declaration.

In correct XML the declaration is the first entry in the file.

 *    <?xml version="1.0" standalone="yes"?>
 * 

TinyXml will happily read or write files without a declaration, however. There are 3 possible attributes to the declaration: version, encoding, and standalone.

Note: In this version of the code, the attributes are handled as special cases, not generic attributes, simply because there can only be at most 3 and they are always the same.


Constructor & Destructor Documentation

TiXmlDeclaration ( )
inline

Construct an empty declaration

TiXmlDeclaration ( const char *  _version,
const char *  _encoding,
const char *  _standalone 
)

Constructor

Constructor


Member Function Documentation

virtual bool Accept ( TiXmlVisitor *  visitor) const
virtual

Walk the XML tree visiting this node and all of its children.

Implements TiXmlNode.

virtual TiXmlNode* Clone ( ) const
virtual

Creates a copy of this Declaration and returns it.

Implements TiXmlNode.

const char* Encoding ( ) const
inline

Encoding. Will return an empty string if none was found.

void operator= ( const TiXmlDeclaration &  copy)

Assignement from other TiXmlDeclaration

virtual void Print ( FILE *  cfile,
int  depth,
edelib::String *  str 
) const
virtual

Print this declaration to a FILE stream.

virtual void Print ( FILE *  cfile,
int  depth 
) const
inlinevirtual

Print this declaration to a FILE stream.

Implements TiXmlBase.

References TiXmlBase::Print().

const char* Standalone ( ) const
inline

Is this a standalone document?

virtual const TiXmlDeclaration* ToDeclaration ( ) const
inlinevirtual

Cast to a more defined type. Will return null not of the requested type.

Reimplemented from TiXmlNode.

virtual TiXmlDeclaration* ToDeclaration ( )
inlinevirtual

Cast to a more defined type. Will return null not of the requested type.

Reimplemented from TiXmlNode.

const char* Version ( ) const
inline

Version. Will return an empty string if none was found.


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