Logo Search packages:      
Sourcecode: lame version File versions  Download package

Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | Friends

TiXmlDeclaration Class Reference

#include <tinyxml.h>

Inheritance diagram for TiXmlDeclaration:
Inheritance graph
[legend]
Collaboration diagram for TiXmlDeclaration:
Collaboration graph
[legend]

List of all members.

Public Types

enum  NodeType {
  DOCUMENT, ELEMENT, COMMENT, UNKNOWN,
  TEXT, DECLARATION, TYPECOUNT
}

Public Member Functions

void Clear ()
 Delete all the children of this node. Does not affect 'this'.
virtual TiXmlNodeClone () const
const std::string & Encoding () const
 Encoding. Will return empty if none was found.
TiXmlNodeFirstChild (const std::string &value) const
 The first child of this node with the matching 'value'. Will be null if none found.
TiXmlNodeFirstChild () const
 The first child of this node. Will be null if there are no children.
TiXmlElementFirstChildElement () const
 Convenience function to get through elements.
TiXmlElementFirstChildElement (const std::string &value) const
 Convenience function to get through elements.
TiXmlDocumentGetDocument () const
TiXmlNodeInsertAfterChild (TiXmlNode *afterThis, const TiXmlNode &addThis)
TiXmlNodeInsertBeforeChild (TiXmlNode *beforeThis, const TiXmlNode &addThis)
TiXmlNodeInsertEndChild (const TiXmlNode &addThis)
TiXmlNodeIterateChildren (TiXmlNode *previous) const
 The last child of this node matching 'value'. Will be null if there are no children.
TiXmlNodeIterateChildren (const std::string &value, TiXmlNode *previous) const
 This flavor of IterateChildren searches for children with a particular 'value'.
TiXmlNodeLastChild () const
TiXmlNodeLastChild (const std::string &value) const
 The last child of this node. Will be null if there are no children.
TiXmlNodeNextSibling () const
 Navigate to a sibling node.
TiXmlNodeNextSibling (const std::string &) const
 Navigate to a sibling node with the given 'value'.
TiXmlElementNextSiblingElement (const std::string &) const
TiXmlElementNextSiblingElement () const
bool NoChildren () const
 Returns true if this node has no children.
TiXmlNodeParent () const
 One step up the DOM.
TiXmlNodePreviousSibling () const
 Navigate to a sibling node.
TiXmlNodePreviousSibling (const std::string &) const
 Navigate to a sibling node.
virtual void Print (FILE *cfile, int depth) const
bool RemoveChild (TiXmlNode *removeThis)
 Delete a child of this node.
TiXmlNodeReplaceChild (TiXmlNode *replaceThis, const TiXmlNode &withThis)
void SetValue (const std::string &_value)
const std::string & Standalone () const
 Is this a standalone document?
virtual void StreamIn (std::istream *in, std::string *tag)
virtual void StreamOut (std::ostream *out) const
 TiXmlDeclaration (const std::string &version, const std::string &encoding, const std::string &standalone)
 Construct.
 TiXmlDeclaration ()
 Construct an empty declaration.
TiXmlCommentToComment () const
 Cast to a more defined type. Will return null not of the requested type.
TiXmlDeclarationToDeclaration () const
 Cast to a more defined type. Will return null not of the requested type.
TiXmlDocumentToDocument () const
 Cast to a more defined type. Will return null not of the requested type.
TiXmlElementToElement () const
 Cast to a more defined type. Will return null not of the requested type.
TiXmlTextToText () const
 Cast to a more defined type. Will return null not of the requested type.
TiXmlUnknownToUnknown () const
 Cast to a more defined type. Will return null not of the requested type.
virtual int Type () const
 Query the type (as an enumerated value, above) of this node.
const std::string & Value () const
const std::string & Version () const
 Version. Will return empty if none was found.

Static Public Member Functions

static bool IsWhiteSpaceCondensed ()
 Return the current white space setting.
static void SetCondenseWhiteSpace (bool condense)

Protected Types

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_STRING_COUNT
}

Protected Member Functions

void CopyToClone (TiXmlNode *target) const
TiXmlNodeIdentify (const char *start)
TiXmlNodeLinkEndChild (TiXmlNode *addThis)
virtual const char * Parse (const char *p)

Static Protected Member Functions

static const char * GetChar (const char *p, char *value)
static const char * GetEntity (const char *in, char *value)
static bool IsWhiteSpace (int c)
static void PutString (const std::string &str, std::ostream *stream)
static const char * ReadName (const char *, std::string *name)
static const char * ReadText (const char *in, std::string *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase)
static const char * SkipWhiteSpace (const char *)
static bool StreamTo (std::istream *in, int character, std::string *tag)
static bool StreamWhiteSpace (std::istream *in, std::string *tag)
static bool StringEqual (const char *p, const char *endTag, bool ignoreCase)

Protected Attributes

TiXmlNodefirstChild
TiXmlNodelastChild
TiXmlNodenext
TiXmlNodeparent
TiXmlNodeprev
NodeType type
std::string value

Static Protected Attributes

static const char * errorString [TIXML_ERROR_STRING_COUNT]

Private Attributes

std::string encoding
std::string standalone
std::string version

Friends

std::ostream & operator<< (std::ostream &out, const TiXmlNode &base)
std::istream & operator>> (std::istream &in, TiXmlNode &base)

Detailed Description

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.

Definition at line 655 of file tinyxml.h.


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

Generated by  Doxygen 1.6.0   Back to index