26#ifndef TINYXML_INCLUDED
27#define TINYXML_INCLUDED
29#define TIXML_USE_TICPP
33#pragma warning(disable : 4530)
34#pragma warning(disable : 4786)
46#if defined(_DEBUG) && !defined(DEBUG)
60#define TIXML_STRING std::string
63#define TIXML_STRING TiXmlString
73#if defined(_MSC_VER) && (_MSC_VER >= 1400)
75#define TIXML_SNPRINTF _snprintf_s
76#define TIXML_SNSCANF _snscanf_s
77#define TIXML_SSCANF sscanf_s
78#elif defined(_MSC_VER) && (_MSC_VER >= 1200)
81#define TIXML_SNPRINTF _snprintf
82#define TIXML_SNSCANF _snscanf
83#define TIXML_SSCANF sscanf
84#elif defined( __GNUC__) && ( __GNUC__ >= 3)
87#define TIXML_SNPRINTF snprintf
88#define TIXML_SNSCANF snscanf
89#define TIXML_SSCANF sscanf
91#define TIXML_SSCANF sscanf
209#ifdef TIXML_USE_TICPP
234 virtual void Print(FILE* cfile,
int depth)
const = 0;
329 return (std::isspace((
unsigned char)c) || c ==
'\n' || c ==
'\r');
356 bool ignoreWhiteSpace,
367 inline static const char*
373 assert(*length >= 0 && *length < 5);
379 if (*p ==
'&')
return GetEntity(p, _value, length, encoding);
383 }
else if (*length) {
387 for (
int i = 0; p[i] && i < *length; ++i) {
391 return p + (*length);
421 if (v < 128)
return std::tolower(v);
425 return std::tolower(v);
570 (
const_cast< const TiXmlNode*
>(
this))->FirstChild(_value));
583 (
const_cast< const TiXmlNode*
>(
this))->LastChild(_value));
620 (
const_cast< const TiXmlNode*
>(
this))->IterateChildren(previous));
629 (
const_cast< const TiXmlNode*
>(
this))->IterateChildren(_value, previous));
685 (
const_cast< const TiXmlNode*
>(
this))->PreviousSibling(_prev));
711 (
const_cast< const TiXmlNode*
>(
this))->NextSibling(_next));
721 (
const_cast< const TiXmlNode*
>(
this))->NextSiblingElement());
731 (
const_cast< const TiXmlNode*
>(
this))->NextSiblingElement(_next));
747 (
const_cast< const TiXmlNode*
>(
this))->FirstChildElement());
754 (
const_cast< const TiXmlNode*
>(
this))->FirstChildElement(_value));
778 (
const_cast< const TiXmlNode*
>(
this))->GetDocument());
948 return value.c_str();
1016 virtual void Print(FILE* cfile,
int depth)
const {
Print(cfile, depth, 0); }
1114 const char*
Attribute(
const char* name)
const;
1122 const char*
Attribute(
const char* name,
int* i)
const;
1130 const char*
Attribute(
const char* name,
double* d)
const;
1163 template <
typename T >
1169 std::stringstream sstream(node->
ValueStr());
1170 sstream >> *outValue;
1203 void SetAttribute(
const char* name,
const char* _value);
1206 const std::string*
Attribute(
const std::string& name)
const;
1207 const std::string*
Attribute(
const std::string& name,
int* i)
const;
1208 const std::string*
Attribute(
const std::string& name,
double* d)
const;
1213 void SetAttribute(
const std::string& name,
const std::string& _value);
1215 void SetAttribute(
const std::string& name,
int _value);
1288 virtual void Print(FILE* cfile,
int depth)
const;
1348 virtual void Print(FILE* cfile,
int depth)
const;
1417 virtual void Print(FILE* cfile,
int depth)
const;
1478 const std::string& _encoding,
1479 const std::string& _standalone);
1484 const char* _encoding,
1485 const char* _standalone);
1503 virtual void Print(FILE* cfile,
int depth)
const {
Print(cfile, depth, 0); }
1571 virtual void Print(FILE* cfile,
int depth)
const {
Print(cfile, depth, 0); }
1623 virtual void Print(FILE* cfile,
int depth)
const;
1682 bool LoadFile(
const char* filename,
1685 bool SaveFile(
const char* filename)
const;
1704 return LoadFile(filename.c_str(), encoding);
1721 virtual const char*
Parse(
const char* p,
1820 virtual void Print(FILE* cfile,
int depth = 0)
const;
2003 return Child(_value.c_str(), index);
2016 return ((
node &&
node->ToElement()) ?
node->ToElement() : 0);
2021 return ((
node &&
node->ToText()) ?
node->ToText() : 0);
2026 return ((
node &&
node->ToUnknown()) ?
node->ToUnknown() : 0);
2103 lineBreak = _lineBreak ? _lineBreak :
"";
2128 for (
int i = 0; i <
depth; ++i)
TiCppRC()
Constructor Spawns new reference counter with a pointer to this.
const TiXmlAttribute * Find(const char *_name) const
TiXmlAttribute * Find(const std::string &_name)
void Add(TiXmlAttribute *attribute)
TiXmlAttribute * Find(const char *_name)
void Remove(TiXmlAttribute *attribute)
void operator=(const TiXmlAttributeSet &)
const TiXmlAttribute * First() const
TiXmlAttributeSet(const TiXmlAttributeSet &)
const TiXmlAttribute * Last() const
An attribute is a name-value pair.
void SetDoubleValue(double _value)
Set the value from a double.
TiXmlAttribute(const std::string &_name, const std::string &_value)
std::string constructor.
const char * Value() const
Return the value of this attribute.
TiXmlAttribute * Previous()
void SetValue(const char *_value)
Set the value.
const TIXML_STRING & NameTStr() const
friend class TiXmlAttributeSet
bool operator==(const TiXmlAttribute &rhs) const
virtual void Print(FILE *cfile, int depth) const
All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL ...
bool operator>(const TiXmlAttribute &rhs) const
int QueryIntValue(int *_value) const
QueryIntValue examines the value string.
int QueryDoubleValue(double *_value) const
QueryDoubleValue examines the value string. See QueryIntValue().
TiXmlAttribute(const char *_name, const char *_value)
Construct an attribute with a name and value.
void SetIntValue(int _value)
Set the value from an integer.
bool operator<(const TiXmlAttribute &rhs) const
const char * Name() const
Return the name of this attribute.
void operator=(const TiXmlAttribute &base)
double DoubleValue() const
Return the value of this attribute, converted to a double.
TiXmlAttribute()
Construct an empty attribute.
void SetName(const std::string &_name)
STL std::string form.
void SetValue(const std::string &_value)
STL std::string form.
void SetName(const char *_name)
Set the name of this attribute.
void SetDocument(TiXmlDocument *doc)
int IntValue() const
Return the value of this attribute, converted to an integer.
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
const std::string & ValueStr() const
Return the value of this attribute.
TiXmlAttribute(const TiXmlAttribute &)
const TiXmlAttribute * Next() const
Get the next sibling attribute in the DOM. Returns null at end.
const TiXmlAttribute * Previous() const
Get the previous sibling attribute in the DOM. Returns null at beginning.
static void ConvertUTF32ToUTF8(unsigned long input, char *output, int *length)
virtual void Print(FILE *cfile, int depth) const =0
All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL ...
static void SetCondenseWhiteSpace(bool condense)
The world does not agree on whether white space should be kept or not.
friend class TiXmlDocument
void operator=(const TiXmlBase &base)
static bool StreamWhiteSpace(std::istream *in, TIXML_STRING *tag)
static const char * ReadName(const char *p, TIXML_STRING *name, TiXmlEncoding encoding)
static int IsAlphaNum(unsigned char anyByte, TiXmlEncoding encoding)
static void EncodeString(const TIXML_STRING &str, TIXML_STRING *out)
Expands entities in a string.
static bool IsWhiteSpace(int c)
void * GetUserData()
Get a pointer to arbitrary user data.
static bool condenseWhiteSpace
static bool StringEqual(const char *p, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
static const char * GetChar(const char *p, char *_value, int *length, TiXmlEncoding encoding)
TiXmlBase(const TiXmlBase &)
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)=0
@ TIXML_ERROR_STRING_COUNT
@ TIXML_ERROR_READING_END_TAG
@ TIXML_ERROR_PARSING_UNKNOWN
@ TIXML_ERROR_PARSING_DECLARATION
@ TIXML_ERROR_PARSING_ELEMENT
@ TIXML_ERROR_PARSING_EMPTY
@ TIXML_ERROR_READING_ATTRIBUTES
@ TIXML_ERROR_DOCUMENT_TOP_ONLY
@ TIXML_ERROR_PARSING_COMMENT
@ TIXML_ERROR_OUT_OF_MEMORY
@ TIXML_ERROR_PARSING_CDATA
@ TIXML_ERROR_DOCUMENT_EMPTY
@ TIXML_ERROR_OPENING_FILE
@ TIXML_ERROR_EMBEDDED_nullptr
@ TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME
@ TIXML_ERROR_READING_ELEMENT_VALUE
static int ToLower(int v, TiXmlEncoding encoding)
static const char * errorString[TIXML_ERROR_STRING_COUNT]
const void * GetUserData() const
Get a pointer to arbitrary user data.
static const char * ReadText(const char *in, TIXML_STRING *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
static bool StreamTo(std::istream *in, int character, TIXML_STRING *tag)
static Entity entity[NUM_ENTITY]
void * userData
Field containing a generic user pointer.
friend class TiXmlElement
static const char * SkipWhiteSpace(const char *, TiXmlEncoding encoding)
static const char * GetEntity(const char *in, char *value, int *length, TiXmlEncoding encoding)
void SetUserData(void *user)
Set a pointer to arbitrary user data.
static const int utf8ByteTable[256]
int Row() const
Return the position, in the original source file, of this node or attribute.
int Column() const
See Row().
static bool IsWhiteSpaceCondensed()
Return the current white space setting.
static int IsAlpha(unsigned char anyByte, TiXmlEncoding encoding)
static bool IsWhiteSpace(char c)
In correct XML the declaration is the first entry in the file.
virtual TiXmlDeclaration * ToDeclaration()
Cast to a more defined type. Will return null not of the requested type.
void operator=(const TiXmlDeclaration ©)
const char * Standalone() const
Is this a standalone document?
void CopyTo(TiXmlDeclaration *target) const
virtual TiXmlNode * Clone() const
Creates a copy of this Declaration and returns it.
const char * Encoding() const
Encoding. Will return an empty string if none was found.
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
TiXmlDeclaration()
Construct an empty declaration.
virtual bool Accept(TiXmlVisitor *visitor) const
Walk the XML tree visiting this node and all of its children.
const char * Version() const
Version. Will return an empty string if none was found.
virtual void Print(FILE *cfile, int depth, TIXML_STRING *str) const
virtual ~TiXmlDeclaration()
virtual void Print(FILE *cfile, int depth) const
All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL ...
virtual const TiXmlDeclaration * ToDeclaration() const
Cast to a more defined type. Will return null not of the requested type.
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)
Always the top level node.
const char * ErrorDesc() const
Contains a textual (english) description of the error if one occurs.
int ErrorRow() const
Returns the location (if known) of the error.
bool LoadFile(const std::string &filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
bool SaveFile(const std::string &filename) const
bool Error() const
If an error occurs, Error will be set to true.
virtual TiXmlNode * Clone() const
Create an exact duplicate of this node and return it.
bool LoadFile(TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
Load a file using the current document value.
void SetTabSize(int _tabsize)
SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) to report the correct v...
virtual TiXmlDocument * ToDocument()
Cast to a more defined type. Will return null not of the requested type.
void SetError(int err, const char *errorLocation, TiXmlParsingData *prevData, TiXmlEncoding encoding)
virtual const TiXmlDocument * ToDocument() const
Cast to a more defined type. Will return null not of the requested type.
virtual const char * Parse(const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
Parse the given null terminated block of xml data.
virtual bool Accept(TiXmlVisitor *content) const
Walk the XML tree visiting this node and all of its children.
TiXmlDocument()
Create an empty document, that has no name.
TiXmlCursor errorLocation
void Print() const
Write the document to standard out using formatted printing ("prettyprint").
void CopyTo(TiXmlDocument *target) const
void operator=(const TiXmlDocument ©)
bool SaveFile() const
Save a file using the current document value. Returns true if successful.
const TiXmlElement * RootElement() const
Get the root element – the only top level element – of the document.
TiXmlElement * RootElement()
int ErrorId() const
Generally, you probably want the error string ( ErrorDesc() ).
void ClearError()
If you have handled the error, it can be reset with this call.
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)
int ErrorCol() const
The column where the error occured. See ErrorRow().
The element is a container class.
TiXmlAttribute * FirstAttribute()
TiXmlElement(const char *in_value)
Construct an element.
virtual bool Accept(TiXmlVisitor *visitor) const
Walk the XML tree visiting this node and all of its children.
void SetDoubleAttribute(const char *name, double value)
Sets an attribute of name to a given value.
void RemoveAttribute(const std::string &name)
STL std::string form.
int QueryFloatAttribute(const char *name, float *_value) const
QueryFloatAttribute examines the attribute - see QueryIntAttribute().
void RemoveAttribute(const char *name)
Deletes an attribute with the given name.
TiXmlAttributeSet attributeSet
int QueryIntAttribute(const char *name, int *_value) const
QueryIntAttribute examines the attribute - it is an alternative to the Attribute() method with richer...
const char * Attribute(const char *name) const
Given an attribute name, Attribute() returns the value for the attribute of that name,...
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)
TiXmlAttribute * LastAttribute()
int QueryValueAttribute(const std::string &name, T *outValue) const
Template form of the attribute query which will try to read the attribute into the specified type.
virtual TiXmlNode * Clone() const
Creates a new Element and returns it - the returned element is a copy.
virtual void Print(FILE *cfile, int depth) const
All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL ...
virtual const TiXmlElement * ToElement() const
Cast to a more defined type. Will return null not of the requested type.
void CopyTo(TiXmlElement *target) const
void SetAttribute(const char *name, const char *_value)
Sets an attribute of name to a given value.
const char * ReadValue(const char *in, TiXmlParsingData *prevData, TiXmlEncoding encoding)
const TiXmlAttribute * FirstAttribute() const
Access the first attribute in this element.
const TiXmlAttribute * LastAttribute() const
Access the last attribute in this element.
int QueryDoubleAttribute(const char *name, double *_value) const
QueryDoubleAttribute examines the attribute - see QueryIntAttribute().
virtual TiXmlElement * ToElement()
Cast to a more defined type. Will return null not of the requested type.
const char * GetText() const
Convenience function for easy access to the text inside an element.
void operator=(const TiXmlElement &base)
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly useful thi...
TiXmlUnknown * ToUnknown() const
Return the handle as a TiXmlUnknown.
TiXmlHandle(const TiXmlHandle &ref)
Copy constructor.
TiXmlNode * ToNode() const
Return the handle as a TiXmlNode.
TiXmlText * ToText() const
Return the handle as a TiXmlText.
TiXmlHandle Child(const char *value, int index) const
Return a handle to the "index" child with the given name.
TiXmlUnknown * Unknown() const
TiXmlElement * ToElement() const
Return the handle as a TiXmlElement.
TiXmlHandle(TiXmlNode *_node)
Create a handle from any node (at any depth of the tree.) This can be a null pointer.
TiXmlHandle Child(const std::string &_value, int index) const
TiXmlElement * Element() const
TiXmlHandle FirstChildElement(const std::string &_value) const
TiXmlHandle operator=(const TiXmlHandle &ref)
TiXmlHandle FirstChildElement() const
Return a handle to the first child element.
TiXmlHandle ChildElement(const std::string &_value, int index) const
TiXmlHandle FirstChild() const
Return a handle to the first child node.
TiXmlHandle ChildElement(const char *value, int index) const
Return a handle to the "index" child element with the given name.
TiXmlHandle FirstChild(const std::string &_value) const
The parent class for everything in the Document Object Model.
TiXmlDocument * GetDocument()
int Type() const
Query the type (as an enumerated value, above) of this node.
virtual const TiXmlComment * ToComment() const
Cast to a more defined type. Will return null if not of the requested type.
const TiXmlElement * FirstChildElement() const
Convenience function to get through elements.
const TiXmlNode * NextSibling(const std::string &_value) const
STL std::string form.
friend class TiXmlDocument
TiXmlNode * LinkEndChild(TiXmlNode *addThis)
Add a new node related to this.
const TiXmlNode * PreviousSibling(const std::string &_value) const
STL std::string form.
TiXmlNode * IterateChildren(const char *_value, const TiXmlNode *previous)
virtual const TiXmlText * ToText() const
Cast to a more defined type. Will return null if not of the requested type.
void SetValue(const std::string &_value)
STL std::string form.
TiXmlNode * InsertAfterChild(TiXmlNode *afterThis, const TiXmlNode &addThis)
Add a new node related to this.
void SetValue(const char *_value)
Changes the value of the node.
TiXmlNode * LastChild(const std::string &_value)
STL std::string form.
const TiXmlNode * Parent() const
TiXmlElement * FirstChildElement(const std::string &_value)
STL std::string form.
const TiXmlNode * PreviousSibling() const
Navigate to a sibling node.
TiXmlElement * FirstChildElement(const char *_value)
const char * Value() const
The meaning of 'value' changes for the specific type of TiXmlNode.
const TiXmlNode * NextSibling() const
Navigate to a sibling node.
TiXmlNode(NodeType _type)
TiXmlNode * LastChild()
The last child of this node. Will be null if there are no children.
const TiXmlElement * FirstChildElement(const std::string &_value) const
STL std::string form.
TiXmlNode * ReplaceChild(TiXmlNode *replaceThis, const TiXmlNode &withThis)
Replace a child of this node.
TiXmlNode * PreviousSibling(const std::string &_value)
STL std::string form.
TiXmlElement * NextSiblingElement(const char *_next)
virtual const TiXmlDeclaration * ToDeclaration() const
Cast to a more defined type. Will return null if not of the requested type.
TiXmlNode * FirstChild(const std::string &_value)
STL std::string form.
TiXmlNode(const TiXmlNode &)
TiXmlElement * FirstChildElement()
const std::string & ValueStr() const
Return Value() as a std::string.
const TiXmlNode * IterateChildren(const TiXmlNode *previous) const
An alternate way to walk the children of a node.
TiXmlNode * PreviousSibling(const char *_prev)
virtual TiXmlComment * ToComment()
Cast to a more defined type. Will return null if not of the requested type.
void Clear()
Delete all the children of this node. Does not affect 'this'.
TiXmlNode * InsertBeforeChild(TiXmlNode *beforeThis, const TiXmlNode &addThis)
Add a new node related to this.
TiXmlNode * IterateChildren(const TiXmlNode *previous)
const TiXmlNode * IterateChildren(const std::string &_value, const TiXmlNode *previous) const
STL std::string form.
virtual TiXmlDocument * ToDocument()
Cast to a more defined type. Will return null if not of the requested type.
virtual const TiXmlStylesheetReference * ToStylesheetReference() const
Cast to a more defined type. Will return null if not of the requested type.
virtual const TiXmlDocument * ToDocument() const
Cast to a more defined type. Will return null if not of the requested type.
NodeType
The types of XML nodes supported by TinyXml.
virtual TiXmlNode * Clone() const =0
Create an exact duplicate of this node and return it.
virtual TiXmlDeclaration * ToDeclaration()
Cast to a more defined type. Will return null if not of the requested type.
TiXmlNode * NextSibling(const char *_next)
TiXmlNode * NextSibling(const std::string &_value)
STL std::string form.
virtual TiXmlText * ToText()
Cast to a more defined type. Will return null if not of the requested type.
const TiXmlElement * NextSiblingElement(const std::string &_value) const
STL std::string form.
virtual TiXmlStylesheetReference * ToStylesheetReference()
Cast to a more defined type. Will return null if not of the requested type.
const TiXmlNode * LastChild() const
TiXmlNode * Parent()
One step up the DOM.
const TiXmlNode * FirstChild(const std::string &_value) const
STL std::string form.
virtual const TiXmlUnknown * ToUnknown() const
Cast to a more defined type. Will return null if not of the requested type.
TiXmlElement * NextSiblingElement(const std::string &_value)
STL std::string form.
virtual TiXmlUnknown * ToUnknown()
Cast to a more defined type. Will return null if not of the requested type.
void operator=(const TiXmlNode &base)
TiXmlNode * IterateChildren(const std::string &_value, const TiXmlNode *previous)
STL std::string form.
void CopyTo(TiXmlNode *target) const
TiXmlNode * FirstChild(const char *_value)
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)=0
friend class TiXmlElement
bool NoChildren() const
Returns true if this node has no children.
TiXmlNode * Identify(const char *start, TiXmlEncoding encoding)
const TiXmlElement * NextSiblingElement() const
Convenience function to get through elements.
virtual bool Accept(TiXmlVisitor *visitor) const =0
Accept a hierchical visit the nodes in the TinyXML DOM.
virtual TiXmlElement * ToElement()
Cast to a more defined type. Will return null if not of the requested type.
TiXmlNode * PreviousSibling()
virtual const TiXmlElement * ToElement() const
Cast to a more defined type. Will return null if not of the requested type.
const TiXmlNode * LastChild(const std::string &_value) const
STL std::string form.
const TiXmlDocument * GetDocument() const
Return a pointer to the Document this node lives in.
bool RemoveChild(TiXmlNode *removeThis)
Delete a child of this node.
friend std::istream & operator>>(std::istream &in, TiXmlNode &base)
An input stream operator, for every class.
const TiXmlNode * FirstChild() const
The first child of this node. Will be null if there are no children.
TiXmlNode * NextSibling()
TiXmlNode * InsertEndChild(const TiXmlNode &addThis)
Add a new node related to this.
const TIXML_STRING & ValueTStr() const
TiXmlElement * NextSiblingElement()
TiXmlNode * LastChild(const char *_value)
The last child of this node matching 'value'. Will be null if there are no children.
friend std::ostream & operator<<(std::ostream &out, const TiXmlNode &base)
An output stream operator, for every class.
virtual bool VisitExit(const TiXmlDocument &doc)
Visit a document.
const char * Indent()
Query the indention string.
void SetIndent(const char *_indent)
Set the indent characters for printing.
virtual bool VisitEnter(const TiXmlDocument &doc)
Visit a document.
void SetLineBreak(const char *_lineBreak)
Set the line breaking string.
const char * LineBreak()
Query the current line breaking string.
void SetStreamPrinting()
Switch over to "stream printing" which is the most dense formatting without linebreaks.
size_t Size()
Return the length of the result string.
const std::string & Str()
Return the result.
virtual bool Visit(const TiXmlDeclaration &declaration)
Visit a declaration.
const char * CStr()
Return the result.
A stylesheet reference looks like this:
void CopyTo(TiXmlStylesheetReference *target) const
virtual TiXmlStylesheetReference * ToStylesheetReference()
Cast to a more defined type. Will return null not of the requested type.
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)
TiXmlStylesheetReference()
Construct an empty declaration.
virtual bool Accept(TiXmlVisitor *visitor) const
Walk the XML tree visiting this node and all of its children.
const char * Href() const
Href. Will return an empty string if none was found.
virtual const TiXmlStylesheetReference * ToStylesheetReference() const
Cast to a more defined type. Will return null not of the requested type.
virtual ~TiXmlStylesheetReference()
void operator=(const TiXmlStylesheetReference ©)
virtual void Print(FILE *cfile, int depth, TIXML_STRING *str) const
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
virtual void Print(FILE *cfile, int depth) const
All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL ...
const char * Type() const
Type. Will return an empty string if none was found.
virtual TiXmlNode * Clone() const
Creates a copy of this StylesheetReference and returns it.
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)
virtual TiXmlText * ToText()
Cast to a more defined type. Will return null not of the requested type.
TiXmlText(const std::string &initValue)
Constructor.
void CopyTo(TiXmlText *target) const
virtual const TiXmlText * ToText() const
Cast to a more defined type. Will return null not of the requested type.
virtual void Print(FILE *cfile, int depth) const
All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL ...
TiXmlText(const TiXmlText ©)
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
virtual TiXmlNode * Clone() const
[internal use] Creates a new Element and returns it.
bool CDATA() const
Queries whether this represents text using a CDATA section.
friend class TiXmlElement
void SetCDATA(bool _cdata)
Turns on or off a CDATA representation of text.
void operator=(const TiXmlText &base)
virtual bool Accept(TiXmlVisitor *content) const
Walk the XML tree visiting this node and all of its children.
TiXmlText(const char *initValue)
Constructor for text element.
Any tag that tinyXml doesn't recognize is saved as an unknown.
virtual TiXmlNode * Clone() const
Creates a copy of this Unknown and returns it.
virtual TiXmlUnknown * ToUnknown()
Cast to a more defined type. Will return null not of the requested type.
void operator=(const TiXmlUnknown ©)
virtual void Print(FILE *cfile, int depth) const
All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL ...
virtual const TiXmlUnknown * ToUnknown() const
Cast to a more defined type. Will return null not of the requested type.
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
virtual bool Accept(TiXmlVisitor *content) const
Walk the XML tree visiting this node and all of its children.
TiXmlUnknown(const TiXmlUnknown ©)
virtual void StreamIn(std::istream *in, TIXML_STRING *tag)
void CopyTo(TiXmlUnknown *target) const
If you call the Accept() method, it requires being passed a TiXmlVisitor class to handle callbacks.
virtual bool VisitEnter(const TiXmlDocument &)
Visit a document.
virtual bool Visit(const TiXmlText &)
Visit a text node.
virtual bool Visit(const TiXmlComment &)
Visit a comment node.
virtual bool Visit(const TiXmlUnknown &)
Visit an unknow node.
virtual bool Visit(const TiXmlStylesheetReference &)
Visit a stylesheet reference.
virtual bool VisitExit(const TiXmlDocument &)
Visit a document.
virtual bool VisitExit(const TiXmlElement &)
Visit an element.
virtual bool VisitEnter(const TiXmlElement &, const TiXmlAttribute *)
Visit an element.
virtual bool Visit(const TiXmlDeclaration &)
Visit a declaration.
const int TIXML_PATCH_VERSION
const int TIXML_MAJOR_VERSION
const int TIXML_MINOR_VERSION
const TiXmlEncoding TIXML_DEFAULT_ENCODING