Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

TiXmlDeclaration Class Reference

#include <tinyxml.h>

Inheritance diagram for TiXmlDeclaration:

Inheritance graph
[legend]
Collaboration diagram for TiXmlDeclaration:

Collaboration graph
[legend]
List of all members.

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 1120 of file tinyxml.h.

Public Types

enum  NodeType {
  DOCUMENT, ELEMENT, COMMENT, UNKNOWN,
  TEXT, DECLARATION, TYPECOUNT
}
 The types of XML nodes supported by TinyXml. More...
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_STRING_COUNT
}

Public Member Functions

 TiXmlDeclaration ()
 Construct an empty declaration.
 TiXmlDeclaration (const char *_version, const char *_encoding, const char *_standalone)
 Construct.
 TiXmlDeclaration (const TiXmlDeclaration &copy)
void operator= (const TiXmlDeclaration &copy)
virtual ~TiXmlDeclaration ()
const char * Version () const
 Version. Will return an empty string if none was found.
const char * Encoding () const
 Encoding. Will return an empty string if none was found.
const char * Standalone () const
 Is this a standalone document?
virtual TiXmlNodeClone () const
 Creates a copy of this Declaration and returns it.
virtual void Print (FILE *cfile, int depth) const
 Print this declaration to a FILE stream.
virtual const char * Parse (const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
virtual const TiXmlDeclarationToDeclaration () const
 Cast to a more defined type. Will return null not of the requested type.
virtual TiXmlDeclarationToDeclaration ()
 Cast to a more defined type. Will return null not of the requested type.
const char * Value () const
 The meaning of 'value' changes for the specific type of TiXmlNode.
void SetValue (const char *_value)
 Changes the value of the node.
void Clear ()
 Delete all the children of this node. Does not affect 'this'.
TiXmlNodeParent ()
 One step up the DOM.
const TiXmlNodeParent () const
const TiXmlNodeFirstChild () const
 The first child of this node. Will be null if there are no children.
TiXmlNodeFirstChild ()
const TiXmlNodeFirstChild (const char *value) const
 The first child of this node with the matching 'value'. Will be null if none found.
TiXmlNodeFirstChild (const char *value)
 The first child of this node with the matching 'value'. Will be null if none found.
const TiXmlNodeLastChild () const
TiXmlNodeLastChild ()
 The last child of this node. Will be null if there are no children.
const TiXmlNodeLastChild (const char *value) const
TiXmlNodeLastChild (const char *value)
 The last child of this node matching 'value'. Will be null if there are no children.
const TiXmlNodeIterateChildren (const TiXmlNode *previous) const
 An alternate way to walk the children of a node.
TiXmlNodeIterateChildren (TiXmlNode *previous)
const TiXmlNodeIterateChildren (const char *value, const TiXmlNode *previous) const
 This flavor of IterateChildren searches for children with a particular 'value'.
TiXmlNodeIterateChildren (const char *value, TiXmlNode *previous)
TiXmlNodeInsertEndChild (const TiXmlNode &addThis)
 Add a new node related to this.
TiXmlNodeLinkEndChild (TiXmlNode *addThis)
 Add a new node related to this.
TiXmlNodeInsertBeforeChild (TiXmlNode *beforeThis, const TiXmlNode &addThis)
 Add a new node related to this.
TiXmlNodeInsertAfterChild (TiXmlNode *afterThis, const TiXmlNode &addThis)
 Add a new node related to this.
TiXmlNodeReplaceChild (TiXmlNode *replaceThis, const TiXmlNode &withThis)
 Replace a child of this node.
bool RemoveChild (TiXmlNode *removeThis)
 Delete a child of this node.
const TiXmlNodePreviousSibling () const
 Navigate to a sibling node.
TiXmlNodePreviousSibling ()
const TiXmlNodePreviousSibling (const char *) const
 Navigate to a sibling node.
TiXmlNodePreviousSibling (const char *)
const TiXmlNodeNextSibling () const
 Navigate to a sibling node.
TiXmlNodeNextSibling ()
const TiXmlNodeNextSibling (const char *) const
 Navigate to a sibling node with the given 'value'.
TiXmlNodeNextSibling (const char *)
const TiXmlElementNextSiblingElement () const
 Convenience function to get through elements.
TiXmlElementNextSiblingElement ()
const TiXmlElementNextSiblingElement (const char *) const
 Convenience function to get through elements.
TiXmlElementNextSiblingElement (const char *)
const TiXmlElementFirstChildElement () const
 Convenience function to get through elements.
TiXmlElementFirstChildElement ()
const TiXmlElementFirstChildElement (const char *value) const
 Convenience function to get through elements.
TiXmlElementFirstChildElement (const char *value)
int Type () const
 Query the type (as an enumerated value, above) of this node.
const TiXmlDocumentGetDocument () const
 Return a pointer to the Document this node lives in.
TiXmlDocumentGetDocument ()
bool NoChildren () const
 Returns true if this node has no children.
virtual const TiXmlDocumentToDocument () const
 Cast to a more defined type. Will return null if not of the requested type.
virtual TiXmlDocumentToDocument ()
 Cast to a more defined type. Will return null if not of the requested type.
virtual const TiXmlElementToElement () const
 Cast to a more defined type. Will return null if not of the requested type.
virtual TiXmlElementToElement ()
 Cast to a more defined type. Will return null if not of the requested type.
virtual const TiXmlCommentToComment () const
 Cast to a more defined type. Will return null if not of the requested type.
virtual TiXmlCommentToComment ()
 Cast to a more defined type. Will return null if not of the requested type.
virtual const TiXmlUnknownToUnknown () const
 Cast to a more defined type. Will return null if not of the requested type.
virtual TiXmlUnknownToUnknown ()
 Cast to a more defined type. Will return null if not of the requested type.
virtual const TiXmlTextToText () const
 Cast to a more defined type. Will return null if not of the requested type.
virtual TiXmlTextToText ()
 Cast to a more defined type. Will return null if not of the requested type.
int Row () const
 Return the position, in the original source file, of this node or attribute.
int Column () const
 See Row().
void SetUserData (void *user)
void * GetUserData ()

Static Public Member Functions

void SetCondenseWhiteSpace (bool condense)
 The world does not agree on whether white space should be kept or not.
bool IsWhiteSpaceCondensed ()
 Return the current white space setting.

Static Public Attributes

const int utf8ByteTable [256]

Protected Member Functions

void CopyTo (TiXmlDeclaration *target) const
virtual void StreamOut (TIXML_OSTREAM *out) const
void CopyTo (TiXmlNode *target) const
TiXmlNodeIdentify (const char *start, TiXmlEncoding encoding)

Static Protected Member Functions

const char * SkipWhiteSpace (const char *, TiXmlEncoding encoding)
bool IsWhiteSpace (char c)
bool IsWhiteSpace (int c)
const char * ReadName (const char *p, TIXML_STRING *name, TiXmlEncoding encoding)
const char * ReadText (const char *in, TIXML_STRING *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
const char * GetEntity (const char *in, char *value, int *length, TiXmlEncoding encoding)
const char * GetChar (const char *p, char *_value, int *length, TiXmlEncoding encoding)
void PutString (const TIXML_STRING &str, TIXML_OSTREAM *out)
void PutString (const TIXML_STRING &str, TIXML_STRING *out)
bool StringEqual (const char *p, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
int IsAlpha (unsigned char anyByte, TiXmlEncoding encoding)
int IsAlphaNum (unsigned char anyByte, TiXmlEncoding encoding)
int ToLower (int v, TiXmlEncoding encoding)
void ConvertUTF32ToUTF8 (unsigned long input, char *output, int *length)

Protected Attributes

TiXmlNodeparent
NodeType type
TiXmlNodefirstChild
TiXmlNodelastChild
TIXML_STRING value
TiXmlNodeprev
TiXmlNodenext
TiXmlCursor location
void * userData
 Field containing a generic user pointer.

Static Protected Attributes

const char * errorString [TIXML_ERROR_STRING_COUNT]

Private Attributes

TIXML_STRING version
TIXML_STRING encoding
TIXML_STRING standalone

Friends

TIXML_OSTREAM & operator<< (TIXML_OSTREAM &out, const TiXmlNode &base)


Member Enumeration Documentation

anonymous enum [inherited]
 

Enumeration values:
TIXML_NO_ERROR 
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_STRING_COUNT 

Definition at line 209 of file tinyxml.h.

enum TiXmlNode::NodeType [inherited]
 

The types of XML nodes supported by TinyXml.

(All the unsupported types are picked up by UNKNOWN.)

Enumeration values:
DOCUMENT 
ELEMENT 
COMMENT 
UNKNOWN 
TEXT 
DECLARATION 
TYPECOUNT 

Definition at line 427 of file tinyxml.h.


Constructor & Destructor Documentation

TiXmlDeclaration::TiXmlDeclaration  )  [inline]
 

Construct an empty declaration.

Definition at line 1124 of file tinyxml.h.

Referenced by Clone().

TiXmlDeclaration::TiXmlDeclaration const char *  _version,
const char *  _encoding,
const char *  _standalone
 

Construct.

Definition at line 1449 of file tinyxml.cpp.

References encoding, standalone, and version.

TiXmlDeclaration::TiXmlDeclaration const TiXmlDeclaration copy  ) 
 

Definition at line 1473 of file tinyxml.cpp.

References CopyTo().

virtual TiXmlDeclaration::~TiXmlDeclaration  )  [inline, virtual]
 

Definition at line 1141 of file tinyxml.h.


Member Function Documentation

void TiXmlNode::Clear  )  [inherited]
 

Delete all the children of this node. Does not affect 'this'.

Definition at line 177 of file tinyxml.cpp.

References TiXmlNode::firstChild, TiXmlNode::lastChild, and TiXmlNode::next.

Referenced by TiXmlElement::ClearThis(), TiXmlDocument::LoadFile(), main(), operator=(), TiXmlComment::operator=(), and TiXmlDocument::operator=().

TiXmlNode * TiXmlDeclaration::Clone  )  const [virtual]
 

Creates a copy of this Declaration and returns it.

Implements TiXmlNode.

Definition at line 1536 of file tinyxml.cpp.

References CopyTo(), and TiXmlDeclaration().

int TiXmlBase::Column  )  const [inline, inherited]
 

See Row().

Definition at line 196 of file tinyxml.h.

Referenced by main().

void TiXmlBase::ConvertUTF32ToUTF8 unsigned long  input,
char *  output,
int *  length
[static, protected, inherited]
 

Definition at line 87 of file tinyxmlparser.cpp.

Referenced by TiXmlBase::GetEntity().

void TiXmlNode::CopyTo TiXmlNode target  )  const [protected, inherited]
 

Definition at line 170 of file tinyxml.cpp.

References TiXmlNode::SetValue(), TiXmlBase::userData, and TiXmlNode::value.

Referenced by TiXmlUnknown::CopyTo(), CopyTo(), TiXmlText::CopyTo(), TiXmlComment::CopyTo(), TiXmlDocument::CopyTo(), and TiXmlElement::CopyTo().

void TiXmlDeclaration::CopyTo TiXmlDeclaration target  )  const [protected]
 

Definition at line 1526 of file tinyxml.cpp.

References TiXmlNode::CopyTo(), encoding, standalone, and version.

Referenced by Clone(), operator=(), and TiXmlDeclaration().

const char* TiXmlDeclaration::Encoding  )  const [inline]
 

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

Definition at line 1146 of file tinyxml.h.

References encoding.

Referenced by main(), and TiXmlDocument::Parse().

TiXmlNode * TiXmlNode::FirstChild const char *  value  )  [inherited]
 

The first child of this node with the matching 'value'. Will be null if none found.

Definition at line 338 of file tinyxml.cpp.

References TiXmlNode::next, and TiXmlNode::Value().

const TiXmlNode * TiXmlNode::FirstChild const char *  value  )  const [inherited]
 

The first child of this node with the matching 'value'. Will be null if none found.

Definition at line 326 of file tinyxml.cpp.

References TiXmlNode::next, and TiXmlNode::Value().

TiXmlNode* TiXmlNode::FirstChild  )  [inline, inherited]
 

Definition at line 486 of file tinyxml.h.

const TiXmlNode* TiXmlNode::FirstChild  )  const [inline, inherited]
 

The first child of this node. Will be null if there are no children.

Definition at line 485 of file tinyxml.h.

Referenced by TiXmlHandle::Child(), TiXmlHandle::FirstChild(), TiXmlNode::FirstChildElement(), TiXmlElement::GetText(), TiXmlNode::IterateChildren(), main(), TiXmlDocument::Print(), and TiXmlDocument::StreamOut().

TiXmlElement * TiXmlNode::FirstChildElement const char *  value  )  [inherited]
 

Definition at line 521 of file tinyxml.cpp.

References TiXmlNode::FirstChild(), TiXmlNode::NextSibling(), and TiXmlNode::ToElement().

const TiXmlElement * TiXmlNode::FirstChildElement const char *  value  )  const [inherited]
 

Convenience function to get through elements.

Definition at line 507 of file tinyxml.cpp.

References TiXmlNode::FirstChild(), TiXmlNode::NextSibling(), and TiXmlNode::ToElement().

TiXmlElement * TiXmlNode::FirstChildElement  )  [inherited]
 

Definition at line 493 of file tinyxml.cpp.

References TiXmlNode::FirstChild(), TiXmlNode::NextSibling(), and TiXmlNode::ToElement().

const TiXmlElement * TiXmlNode::FirstChildElement  )  const [inherited]
 

Convenience function to get through elements.

Definition at line 479 of file tinyxml.cpp.

References TiXmlNode::FirstChild(), TiXmlNode::NextSibling(), and TiXmlNode::ToElement().

Referenced by TiXmlHandle::ChildElement(), TiXmlHandle::FirstChildElement(), main(), and TiXmlDocument::RootElement().

const char* TiXmlBase::GetChar const char *  p,
char *  _value,
int *  length,
TiXmlEncoding  encoding
[inline, static, protected, inherited]
 

Definition at line 283 of file tinyxml.h.

Referenced by TiXmlBase::ReadText().

TiXmlDocument * TiXmlNode::GetDocument  )  [inherited]
 

Definition at line 604 of file tinyxml.cpp.

References TiXmlNode::parent, and TiXmlNode::ToDocument().

const TiXmlDocument * TiXmlNode::GetDocument  )  const [inherited]
 

Return a pointer to the Document this node lives in.

Returns null if not in a document.

Definition at line 592 of file tinyxml.cpp.

References TiXmlNode::parent, and TiXmlNode::ToDocument().

Referenced by TiXmlNode::Identify(), TiXmlNode::LinkEndChild(), Parse(), TiXmlText::Parse(), TiXmlComment::Parse(), TiXmlUnknown::Parse(), TiXmlElement::Parse(), TiXmlElement::ReadValue(), and TiXmlElement::SetAttribute().

const char * TiXmlBase::GetEntity const char *  in,
char *  value,
int *  length,
TiXmlEncoding  encoding
[static, protected, inherited]
 

Definition at line 427 of file tinyxmlparser.cpp.

References TiXmlBase::Entity::chr, TiXmlBase::ConvertUTF32ToUTF8(), TiXmlBase::entity, TiXmlBase::Entity::strLength, TIXML_STRING, and value.

void* TiXmlBase::GetUserData  )  [inline, inherited]
 

Definition at line 199 of file tinyxml.h.

TiXmlNode * TiXmlNode::Identify const char *  start,
TiXmlEncoding  encoding
[protected, inherited]
 

Definition at line 803 of file tinyxmlparser.cpp.

References TiXmlNode::GetDocument(), TiXmlBase::IsAlpha(), TiXmlNode::parent, TiXmlText::SetCDATA(), TiXmlDocument::SetError(), TiXmlBase::SkipWhiteSpace(), TiXmlBase::StringEqual(), TIXML_ENCODING_UNKNOWN, and TiXmlNode::TiXmlElement.

Referenced by TiXmlDocument::Parse(), and TiXmlElement::ReadValue().

TiXmlNode * TiXmlNode::InsertAfterChild TiXmlNode afterThis,
const TiXmlNode addThis
[inherited]
 

Add a new node related to this.

Adds a child after the specified child. Returns a pointer to the new object or NULL if an error occured.

Definition at line 250 of file tinyxml.cpp.

References TiXmlNode::Clone(), TiXmlNode::lastChild, TiXmlNode::next, TiXmlNode::parent, and TiXmlNode::prev.

Referenced by main().

TiXmlNode * TiXmlNode::InsertBeforeChild TiXmlNode beforeThis,
const TiXmlNode addThis
[inherited]
 

Add a new node related to this.

Adds a child before the specified child. Returns a pointer to the new object or NULL if an error occured.

Definition at line 224 of file tinyxml.cpp.

References TiXmlNode::Clone(), TiXmlNode::firstChild, TiXmlNode::next, TiXmlNode::parent, and TiXmlNode::prev.

Referenced by main().

TiXmlNode * TiXmlNode::InsertEndChild const TiXmlNode addThis  )  [inherited]
 

Add a new node related to this.

Adds a child past the LastChild. Returns a pointer to the new object or NULL if an error occured.

Definition at line 214 of file tinyxml.cpp.

References TiXmlNode::Clone(), and TiXmlNode::LinkEndChild().

Referenced by main().

int TiXmlBase::IsAlpha unsigned char  anyByte,
TiXmlEncoding  encoding
[static, protected, inherited]
 

Definition at line 128 of file tinyxmlparser.cpp.

Referenced by TiXmlNode::Identify(), and TiXmlBase::ReadName().

int TiXmlBase::IsAlphaNum unsigned char  anyByte,
TiXmlEncoding  encoding
[static, protected, inherited]
 

Definition at line 149 of file tinyxmlparser.cpp.

Referenced by TiXmlBase::ReadName().

bool TiXmlBase::IsWhiteSpace int  c  )  [inline, static, protected, inherited]
 

Definition at line 248 of file tinyxml.h.

bool TiXmlBase::IsWhiteSpace char  c  )  [inline, static, protected, inherited]
 

Definition at line 244 of file tinyxml.h.

Referenced by TiXmlText::Blank(), Parse(), TiXmlAttribute::Parse(), TiXmlBase::ReadText(), and TiXmlBase::SkipWhiteSpace().

bool TiXmlBase::IsWhiteSpaceCondensed  )  [inline, static, inherited]
 

Return the current white space setting.

Definition at line 175 of file tinyxml.h.

Referenced by TiXmlElement::ReadValue().

TiXmlNode * TiXmlNode::IterateChildren const char *  value,
TiXmlNode previous
[inherited]
 

Definition at line 411 of file tinyxml.cpp.

References TiXmlNode::FirstChild(), TiXmlNode::NextSibling(), and TiXmlNode::parent.

const TiXmlNode * TiXmlNode::IterateChildren const char *  value,
const TiXmlNode previous
const [inherited]
 

This flavor of IterateChildren searches for children with a particular 'value'.

Definition at line 398 of file tinyxml.cpp.

References TiXmlNode::FirstChild(), TiXmlNode::NextSibling(), and TiXmlNode::parent.

TiXmlNode * TiXmlNode::IterateChildren TiXmlNode previous  )  [inherited]
 

Definition at line 385 of file tinyxml.cpp.

References TiXmlNode::FirstChild(), TiXmlNode::NextSibling(), and TiXmlNode::parent.

const TiXmlNode * TiXmlNode::IterateChildren const TiXmlNode previous  )  const [inherited]
 

An alternate way to walk the children of a node.

One way to iterate over nodes is:

			for( child = parent->FirstChild(); child; child = child->NextSibling() )
		

IterateChildren does the same thing with the syntax:

			child = 0;
			while( child = parent->IterateChildren( child ) )
		

IterateChildren takes the previous child as input and finds the next one. If the previous child is null, it returns the first. IterateChildren will return null when done.

Definition at line 372 of file tinyxml.cpp.

References TiXmlNode::FirstChild(), TiXmlNode::NextSibling(), and TiXmlNode::parent.

Referenced by main().

TiXmlNode * TiXmlNode::LastChild const char *  value  )  [inherited]
 

The last child of this node matching 'value'. Will be null if there are no children.

Definition at line 361 of file tinyxml.cpp.

References TiXmlNode::prev, and TiXmlNode::Value().

const TiXmlNode * TiXmlNode::LastChild const char *  value  )  const [inherited]
 

Definition at line 350 of file tinyxml.cpp.

References TiXmlNode::prev, and TiXmlNode::Value().

TiXmlNode* TiXmlNode::LastChild  )  [inline, inherited]
 

The last child of this node. Will be null if there are no children.

Definition at line 491 of file tinyxml.h.

const TiXmlNode* TiXmlNode::LastChild  )  const [inline, inherited]
 

Definition at line 490 of file tinyxml.h.

Referenced by main().

TiXmlNode * TiXmlNode::LinkEndChild TiXmlNode addThis  )  [inherited]
 

Add a new node related to this.

Adds a child past the LastChild.

NOTE: the node to be added is passed by pointer, and will be henceforth owned (and deleted) by tinyXml. This method is efficient and avoids an extra copy, but should be used with care as it uses a different memory model than the other insert functions.

See also:
InsertEndChild

Definition at line 194 of file tinyxml.cpp.

References TiXmlNode::firstChild, TiXmlNode::GetDocument(), TiXmlNode::lastChild, TiXmlNode::next, TiXmlNode::parent, and TiXmlNode::prev.

Referenced by TiXmlDocument::CopyTo(), TiXmlElement::CopyTo(), TiXmlNode::InsertEndChild(), TiXmlDocument::Parse(), and TiXmlElement::ReadValue().

TiXmlNode * TiXmlNode::NextSibling const char *   )  [inherited]
 

Definition at line 435 of file tinyxml.cpp.

References TiXmlNode::next, and TiXmlNode::Value().

const TiXmlNode * TiXmlNode::NextSibling const char *   )  const [inherited]
 

Navigate to a sibling node with the given 'value'.

Definition at line 424 of file tinyxml.cpp.

References TiXmlNode::next, and TiXmlNode::Value().

TiXmlNode* TiXmlNode::NextSibling  )  [inline, inherited]
 

Definition at line 582 of file tinyxml.h.

const TiXmlNode* TiXmlNode::NextSibling  )  const [inline, inherited]
 

Navigate to a sibling node.

Definition at line 581 of file tinyxml.h.

Referenced by TiXmlHandle::Child(), TiXmlDocument::CopyTo(), TiXmlElement::CopyTo(), TiXmlNode::FirstChildElement(), TiXmlNode::IterateChildren(), main(), TiXmlNode::NextSiblingElement(), TiXmlDocument::Print(), TiXmlElement::Print(), TiXmlDocument::StreamOut(), and TiXmlElement::StreamOut().

TiXmlElement * TiXmlNode::NextSiblingElement const char *   )  [inherited]
 

Definition at line 577 of file tinyxml.cpp.

References TiXmlNode::NextSibling(), and TiXmlNode::ToElement().

const TiXmlElement * TiXmlNode::NextSiblingElement const char *   )  const [inherited]
 

Convenience function to get through elements.

Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element.

Definition at line 563 of file tinyxml.cpp.

References TiXmlNode::NextSibling(), and TiXmlNode::ToElement().

TiXmlElement * TiXmlNode::NextSiblingElement  )  [inherited]
 

Definition at line 549 of file tinyxml.cpp.

References TiXmlNode::NextSibling(), and TiXmlNode::ToElement().

const TiXmlElement * TiXmlNode::NextSiblingElement  )  const [inherited]
 

Convenience function to get through elements.

Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element.

Definition at line 535 of file tinyxml.cpp.

References TiXmlNode::NextSibling(), and TiXmlNode::ToElement().

Referenced by TiXmlHandle::ChildElement(), and main().

bool TiXmlNode::NoChildren  )  const [inline, inherited]
 

Returns true if this node has no children.

Definition at line 633 of file tinyxml.h.

void TiXmlDeclaration::operator= const TiXmlDeclaration copy  ) 
 

Definition at line 1480 of file tinyxml.cpp.

References TiXmlNode::Clear(), and CopyTo().

const TiXmlNode* TiXmlNode::Parent  )  const [inline, inherited]
 

Definition at line 483 of file tinyxml.h.

TiXmlNode* TiXmlNode::Parent  )  [inline, inherited]
 

One step up the DOM.

Definition at line 482 of file tinyxml.h.

const char * TiXmlDeclaration::Parse const char *  p,
TiXmlParsingData *  data,
TiXmlEncoding  encoding
[virtual]
 

Implements TiXmlBase.

Definition at line 1514 of file tinyxmlparser.cpp.

References encoding, TiXmlNode::GetDocument(), TiXmlBase::IsWhiteSpace(), TiXmlAttribute::Parse(), TiXmlDocument::SetError(), TiXmlBase::SkipWhiteSpace(), standalone, TiXmlBase::StringEqual(), TiXmlAttribute::Value(), and version.

Referenced by main().

TiXmlNode * TiXmlNode::PreviousSibling const char *   )  [inherited]
 

Definition at line 457 of file tinyxml.cpp.

References TiXmlNode::prev, and TiXmlNode::Value().

const TiXmlNode * TiXmlNode::PreviousSibling const char *   )  const [inherited]
 

Navigate to a sibling node.

Definition at line 446 of file tinyxml.cpp.

References TiXmlNode::prev, and TiXmlNode::Value().

TiXmlNode* TiXmlNode::PreviousSibling  )  [inline, inherited]
 

Definition at line 567 of file tinyxml.h.

const TiXmlNode* TiXmlNode::PreviousSibling  )  const [inline, inherited]
 

Navigate to a sibling node.

Definition at line 566 of file tinyxml.h.

Referenced by main().

void TiXmlDeclaration::Print FILE *  cfile,
int  depth
const [virtual]
 

Print this declaration to a FILE stream.

Implements TiXmlBase.

Definition at line 1487 of file tinyxml.cpp.

References encoding, standalone, and version.

void TiXmlBase::PutString const TIXML_STRING &  str,
TIXML_STRING *  out
[static, protected, inherited]
 

Definition at line 43 of file tinyxml.cpp.

References TiXmlBase::entity.

void TiXmlBase::PutString const TIXML_STRING &  str,
TIXML_OSTREAM *  out
[static, protected, inherited]
 

Definition at line 36 of file tinyxml.cpp.

References TIXML_STRING.

Referenced by TiXmlText::Print(), TiXmlAttribute::Print(), StreamOut(), TiXmlText::StreamOut(), and TiXmlAttribute::StreamOut().

const char * TiXmlBase::ReadName const char *  p,
TIXML_STRING *  name,
TiXmlEncoding  encoding
[static, protected, inherited]
 

Definition at line 397 of file tinyxmlparser.cpp.

References TiXmlBase::IsAlpha(), and TiXmlBase::IsAlphaNum().

Referenced by TiXmlAttribute::Parse(), and TiXmlElement::Parse().

const char * TiXmlBase::ReadText const char *  in,
TIXML_STRING *  text,
bool  ignoreWhiteSpace,
const char *  endTag,
bool  ignoreCase,
TiXmlEncoding  encoding
[static, protected, inherited]
 

Definition at line 561 of file tinyxmlparser.cpp.

References TiXmlBase::GetChar(), TiXmlBase::IsWhiteSpace(), TiXmlBase::SkipWhiteSpace(), and TiXmlBase::StringEqual().

Referenced by TiXmlText::Parse(), TiXmlAttribute::Parse(), and TiXmlComment::Parse().

bool TiXmlNode::RemoveChild TiXmlNode removeThis  )  [inherited]
 

Delete a child of this node.

Definition at line 304 of file tinyxml.cpp.

References TiXmlNode::firstChild, TiXmlNode::lastChild, TiXmlNode::next, TiXmlNode::parent, and TiXmlNode::prev.

Referenced by main().

TiXmlNode * TiXmlNode::ReplaceChild TiXmlNode replaceThis,
const TiXmlNode withThis
[inherited]
 

Replace a child of this node.

Returns a pointer to the new object or NULL if an error occured.

Definition at line 276 of file tinyxml.cpp.

References TiXmlNode::Clone(), TiXmlNode::firstChild, TiXmlNode::lastChild, TiXmlNode::next, TiXmlNode::parent, and TiXmlNode::prev.

int TiXmlBase::Row  )  const [inline, inherited]
 

Return the position, in the original source file, of this node or attribute.

The row and column are 1-based. (That is the first row and first column is 1,1). If the returns values are 0 or less, then the parser does not have a row and column value.

Generally, the row and column value will be set when the TiXmlDocument::Load(), TiXmlDocument::LoadFile(), or any TiXmlNode::Parse() is called. It will NOT be set when the DOM was created from operator>>.

The values reflect the initial load. Once the DOM is modified programmatically (by adding or changing nodes and attributes) the new values will NOT update to reflect changes in the document.

There is a minor performance cost to computing the row and column. Computation can be disabled if TiXmlDocument::SetTabSize() is called with 0 as the value.

See also:
TiXmlDocument::SetTabSize()

Definition at line 195 of file tinyxml.h.

Referenced by main().

void TiXmlBase::SetCondenseWhiteSpace bool  condense  )  [inline, static, inherited]
 

The world does not agree on whether white space should be kept or not.

In order to make everyone happy, these global, static functions are provided to set whether or not TinyXml will condense all white space into a single space or not. The default is to condense. Note changing this values is not thread safe.

Definition at line 172 of file tinyxml.h.

Referenced by main().

void TiXmlBase::SetUserData void *  user  )  [inline, inherited]
 

Definition at line 198 of file tinyxml.h.

void TiXmlNode::SetValue const char *  _value  )  [inline, inherited]
 

Changes the value of the node.

Defined as:

		Document:	filename of the xml file
		Element:	name of the element
		Comment:	the comment text
		Unknown:	the tag contents
		Text:		the text string
		

Definition at line 471 of file tinyxml.h.

References TiXmlNode::value.

Referenced by TiXmlNode::CopyTo(), and TiXmlText::TiXmlText().

const char * TiXmlBase::SkipWhiteSpace const char *  ,
TiXmlEncoding  encoding
[static, protected, inherited]
 

Definition at line 313 of file tinyxmlparser.cpp.

References TiXmlBase::IsWhiteSpace(), TIXML_UTF_LEAD_0, and TIXML_UTF_LEAD_1.

Referenced by TiXmlNode::Identify(), Parse(), TiXmlAttribute::Parse(), TiXmlComment::Parse(), TiXmlUnknown::Parse(), TiXmlElement::Parse(), TiXmlDocument::Parse(), TiXmlBase::ReadText(), and TiXmlElement::ReadValue().

const char* TiXmlDeclaration::Standalone  )  const [inline]
 

Is this a standalone document?

Definition at line 1148 of file tinyxml.h.

References standalone.

void TiXmlDeclaration::StreamOut TIXML_OSTREAM *  out  )  const [protected, virtual]
 

Implements TiXmlBase.

Definition at line 1500 of file tinyxml.cpp.

References encoding, TiXmlBase::PutString(), standalone, and version.

bool TiXmlBase::StringEqual const char *  p,
const char *  endTag,
bool  ignoreCase,
TiXmlEncoding  encoding
[static, protected, inherited]
 

Definition at line 521 of file tinyxmlparser.cpp.

References TiXmlBase::ToLower().

Referenced by TiXmlNode::Identify(), Parse(), TiXmlText::Parse(), TiXmlComment::Parse(), TiXmlElement::Parse(), TiXmlDocument::Parse(), TiXmlBase::ReadText(), and TiXmlElement::ReadValue().

virtual TiXmlComment* TiXmlNode::ToComment  )  [inline, virtual, inherited]
 

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

Reimplemented in TiXmlComment.

Definition at line 644 of file tinyxml.h.

virtual const TiXmlComment* TiXmlNode::ToComment  )  const [inline, virtual, inherited]
 

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

Reimplemented in TiXmlComment.

Definition at line 637 of file tinyxml.h.

Referenced by main().

virtual TiXmlDeclaration* TiXmlDeclaration::ToDeclaration  )  [inline, virtual]
 

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

Reimplemented from TiXmlNode.

Definition at line 1158 of file tinyxml.h.

virtual const TiXmlDeclaration* TiXmlDeclaration::ToDeclaration  )  const [inline, virtual]
 

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

Reimplemented from TiXmlNode.

Definition at line 1157 of file tinyxml.h.

virtual TiXmlDocument* TiXmlNode::ToDocument  )  [inline, virtual, inherited]
 

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

Reimplemented in TiXmlDocument.

Definition at line 642 of file tinyxml.h.

virtual const TiXmlDocument* TiXmlNode::ToDocument  )  const [inline, virtual, inherited]
 

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

Reimplemented in TiXmlDocument.

Definition at line 635 of file tinyxml.h.

Referenced by TiXmlNode::GetDocument().

virtual TiXmlElement* TiXmlNode::ToElement  )  [inline, virtual, inherited]
 

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

Reimplemented in TiXmlElement.

Definition at line 643 of file tinyxml.h.

virtual const TiXmlElement* TiXmlNode::ToElement  )  const [inline, virtual, inherited]
 

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

Reimplemented in TiXmlElement.

Definition at line 636 of file tinyxml.h.

Referenced by TiXmlNode::FirstChildElement(), main(), TiXmlNode::NextSiblingElement(), and TiXmlDocument::StreamOut().

int TiXmlBase::ToLower int  v,
TiXmlEncoding  encoding
[inline, static, protected, inherited]
 

Definition at line 344 of file tinyxml.h.

Referenced by TiXmlBase::StringEqual().

virtual TiXmlText* TiXmlNode::ToText  )  [inline, virtual, inherited]
 

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

Reimplemented in TiXmlText.

Definition at line 646 of file tinyxml.h.

virtual const TiXmlText* TiXmlNode::ToText  )  const [inline, virtual, inherited]
 

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

Reimplemented in TiXmlText.

Definition at line 639 of file tinyxml.h.

Referenced by TiXmlElement::GetText(), main(), and TiXmlElement::Print().

virtual TiXmlUnknown* TiXmlNode::ToUnknown  )  [inline, virtual, inherited]
 

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

Reimplemented in TiXmlUnknown.

Definition at line 645 of file tinyxml.h.

virtual const TiXmlUnknown* TiXmlNode::ToUnknown  )  const [inline, virtual, inherited]
 

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

Reimplemented in TiXmlUnknown.

Definition at line 638 of file tinyxml.h.

int TiXmlNode::Type  )  const [inline, inherited]
 

Query the type (as an enumerated value, above) of this node.

The possible types are: DOCUMENT, ELEMENT, COMMENT, UNKNOWN, TEXT, and DECLARATION.

Definition at line 624 of file tinyxml.h.

const char* TiXmlNode::Value  )  const [inline, inherited]
 

The meaning of 'value' changes for the specific type of TiXmlNode.

		Document:	filename of the xml file
		Element:	name of the element
		Comment:	the comment text
		Unknown:	the tag contents
		Text:		the text string
		

The subclasses will wrap this function.

Definition at line 452 of file tinyxml.h.

References TiXmlNode::value.

Referenced by TiXmlElement::Clone(), TiXmlNode::FirstChild(), TiXmlElement::GetText(), TiXmlNode::LastChild(), main(), TiXmlNode::NextSibling(), and TiXmlNode::PreviousSibling().

const char* TiXmlDeclaration::Version  )  const [inline]
 

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

Definition at line 1144 of file tinyxml.h.

References version.


Friends And Related Function Documentation

TIXML_OSTREAM& operator<< TIXML_OSTREAM &  out,
const TiXmlNode base
[friend, inherited]
 

Definition at line 1660 of file tinyxml.cpp.


Member Data Documentation

TIXML_STRING TiXmlDeclaration::encoding [private]
 

Definition at line 1171 of file tinyxml.h.

Referenced by CopyTo(), Encoding(), Parse(), Print(), StreamOut(), and TiXmlDeclaration().

const char * TiXmlBase::errorString [static, protected, inherited]
 

Initial value:

{
        "No error",
        "Error",
        "Failed to open file",
        "Memory allocation failed.",
        "Error parsing Element.",
        "Failed to read Element name",
        "Error reading Element value.",
        "Error reading Attributes.",
        "Error: empty tag.",
        "Error reading end tag.",
        "Error parsing Unknown.",
        "Error parsing Comment.",
        "Error parsing Declaration.",
        "Error document empty.",
        "Error null (0) or unexpected EOF found in input stream.",
        "Error parsing CDATA.",
}

Definition at line 34 of file tinyxmlerror.cpp.

TiXmlNode* TiXmlNode::firstChild [protected, inherited]
 

Definition at line 672 of file tinyxml.h.

Referenced by TiXmlNode::Clear(), TiXmlNode::InsertBeforeChild(), TiXmlNode::LinkEndChild(), TiXmlNode::RemoveChild(), TiXmlNode::ReplaceChild(), and TiXmlNode::TiXmlNode().

TiXmlNode* TiXmlNode::lastChild [protected, inherited]
 

Definition at line 673 of file tinyxml.h.

Referenced by TiXmlNode::Clear(), TiXmlNode::InsertAfterChild(), TiXmlNode::LinkEndChild(), TiXmlNode::RemoveChild(), TiXmlNode::ReplaceChild(), and TiXmlNode::TiXmlNode().

TiXmlCursor TiXmlBase::location [protected, inherited]
 

Definition at line 335 of file tinyxml.h.

TiXmlNode* TiXmlNode::next [protected, inherited]
 

Definition at line 678 of file tinyxml.h.

Referenced by TiXmlNode::Clear(), TiXmlAttributeSet::First(), TiXmlNode::FirstChild(), TiXmlNode::InsertAfterChild(), TiXmlNode::InsertBeforeChild(), TiXmlNode::LinkEndChild(), TiXmlNode::NextSibling(), TiXmlNode::RemoveChild(), TiXmlNode::ReplaceChild(), TiXmlNode::TiXmlNode(), and TiXmlNode::~TiXmlNode().

TiXmlNode* TiXmlNode::parent [protected, inherited]
 

Definition at line 669 of file tinyxml.h.

Referenced by TiXmlNode::GetDocument(), TiXmlNode::Identify(), TiXmlNode::InsertAfterChild(), TiXmlNode::InsertBeforeChild(), TiXmlNode::IterateChildren(), TiXmlNode::LinkEndChild(), TiXmlNode::RemoveChild(), TiXmlNode::ReplaceChild(), and TiXmlNode::TiXmlNode().

TiXmlNode* TiXmlNode::prev [protected, inherited]
 

Definition at line 677 of file tinyxml.h.

Referenced by TiXmlNode::InsertAfterChild(), TiXmlNode::InsertBeforeChild(), TiXmlAttributeSet::Last(), TiXmlNode::LastChild(), TiXmlNode::LinkEndChild(), TiXmlNode::PreviousSibling(), TiXmlNode::RemoveChild(), TiXmlNode::ReplaceChild(), and TiXmlNode::TiXmlNode().

TIXML_STRING TiXmlDeclaration::standalone [private]
 

Definition at line 1172 of file tinyxml.h.

Referenced by CopyTo(), Parse(), Print(), Standalone(), StreamOut(), and TiXmlDeclaration().

NodeType TiXmlNode::type [protected, inherited]
 

Definition at line 670 of file tinyxml.h.

Referenced by TiXmlNode::TiXmlNode().

void* TiXmlBase::userData [protected, inherited]
 

Field containing a generic user pointer.

Definition at line 338 of file tinyxml.h.

Referenced by TiXmlNode::CopyTo().

const int TiXmlBase::utf8ByteTable [static, inherited]
 

Initial value:

 
{
        
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
                1,      1,      2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      
                2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      
                3,      3,      3,      3,      3,      3,      3,      3,      3,      3,      3,      3,      3,      3,      3,      3,      
                4,      4,      4,      4,      4,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1       
}

Definition at line 65 of file tinyxmlparser.cpp.

TIXML_STRING TiXmlNode::value [protected, inherited]
 

Definition at line 675 of file tinyxml.h.

Referenced by TiXmlNode::CopyTo(), TiXmlNode::SetValue(), and TiXmlNode::Value().

TIXML_STRING TiXmlDeclaration::version [private]
 

Definition at line 1170 of file tinyxml.h.

Referenced by CopyTo(), Parse(), Print(), StreamOut(), TiXmlDeclaration(), and Version().


The documentation for this class was generated from the following files:
Generated on Wed Sep 5 12:54:44 2007 for DSACSS Operational Code by  doxygen 1.3.9.1