26#ifndef TINYXML_INCLUDED
27#define TINYXML_INCLUDED
30#pragma warning( disable : 4530 )
31#pragma warning( disable : 4786 )
32#pragma warning( disable : 4996 )
44#if defined( _DEBUG ) && !defined( DEBUG )
51 #define TIXML_STRING std::string
52 #define TIXML_ISTREAM std::istream
53 #define TIXML_OSTREAM std::ostream
56 #define TIXML_STRING TiXmlString
57 #define TIXML_OSTREAM TiXmlOutStream
67 #if defined(_MSC_VER) && (_MSC_VER >= 1400 )
69 #define TIXML_SNPRINTF _snprintf_s
70 #define TIXML_SNSCANF _snscanf_s
71 #elif defined(_MSC_VER) && (_MSC_VER >= 1200 )
74 #define TIXML_SNPRINTF _snprintf
75 #define TIXML_SNSCANF _snscanf
76 #elif defined(__GNUC__) && (__GNUC__ >= 3 )
79 #define TIXML_SNPRINTF snprintf
80 #define TIXML_SNSCANF snscanf
207 virtual const char*
Parse(
const char* p,
248 return ( isspace( (
unsigned char) c ) || c ==
'\n' || c ==
'\r' );
260 static bool StreamWhiteSpace( TIXML_ISTREAM * in,
TIXML_STRING * tag );
261 static bool StreamTo( TIXML_ISTREAM * in,
int character,
TIXML_STRING * tag );
273 static const char*
ReadText(
const char* in,
275 bool ignoreWhiteSpace,
291 assert( *length >= 0 && *length < 5 );
301 return GetEntity( p, _value, length, encoding );
309 for(
int i=0; p[i] && i<*length; ++i ) {
312 return p + (*length);
350 if ( v < 128 )
return tolower( v );
398 friend std::istream& operator >> (std::istream& in,
TiXmlNode& base);
461 const std::string& ValueStr()
const {
return value; }
477 void SetValue(
const std::string& _value ) {
value = _value; }
665 virtual void StreamIn( TIXML_ISTREAM* in,
TIXML_STRING* tag ) = 0;
709 TiXmlAttribute(
const std::string& _name,
const std::string& _value )
756 void SetName(
const std::string& _name ) {
name = _name; }
758 void SetValue(
const std::string& _value ) {
value = _value; }
860 const char*
Attribute(
const char* name )
const;
868 const char*
Attribute(
const char* name,
int* i )
const;
876 const char*
Attribute(
const char* name,
double* d )
const;
901 void SetAttribute(
const char* name,
const char * _value );
904 const char*
Attribute(
const std::string& name )
const {
return Attribute( name.c_str() ); }
905 const char*
Attribute(
const std::string& name,
int* i )
const {
return Attribute( name.c_str(), i ); }
906 const char*
Attribute(
const std::string& name,
double* d )
const {
return Attribute( name.c_str(), d ); }
911 void SetAttribute(
const std::string& name,
const std::string& _value );
913 void SetAttribute(
const std::string& name,
int _value );
992 virtual void StreamIn( TIXML_ISTREAM * in,
TIXML_STRING * tag );
1037 #ifdef TIXML_USE_STL
1038 virtual void StreamIn( TIXML_ISTREAM * in,
TIXML_STRING * tag );
1067 #ifdef TIXML_USE_STL
1105 #ifdef TIXML_USE_STL
1106 virtual void StreamIn( TIXML_ISTREAM * in,
TIXML_STRING * tag );
1137 const std::string& _encoding,
1138 const std::string& _standalone );
1143 const char* _encoding,
1144 const char* _standalone );
1171 #ifdef TIXML_USE_STL
1172 virtual void StreamIn( TIXML_ISTREAM * in,
TIXML_STRING * tag );
1213 #ifdef TIXML_USE_STL
1214 virtual void StreamIn( TIXML_ISTREAM * in,
TIXML_STRING * tag );
1247 #ifdef TIXML_USE_STL
1250 StringToBuffer f( filename );
1251 return ( f.buffer && LoadFile( f.buffer, encoding ));
1253 bool SaveFile(
const std::string& filename )
const
1255 StringToBuffer f( filename );
1256 return ( f.buffer &&
SaveFile( f.buffer ));
1348 #ifdef TIXML_USE_STL
1349 virtual void StreamIn( TIXML_ISTREAM * in,
TIXML_STRING * tag );
1481 #ifdef TIXML_USE_STL
1485 TiXmlHandle Child(
const std::string& _value,
int index )
const {
return Child( _value.c_str(), index ); }
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
An attribute is a name-value pair.
Definition tinyxml.h:696
void SetDoubleValue(double _value)
Set the value from a double.
Definition tinyxml.cc:1240
const char * Value() const
Return the value of this attribute.
Definition tinyxml.h:728
void SetValue(const char *_value)
Set the value.
Definition tinyxml.h:749
const TIXML_STRING & NameTStr() const
Definition tinyxml.h:733
bool operator==(const TiXmlAttribute &rhs) const
Definition tinyxml.h:768
bool operator>(const TiXmlAttribute &rhs) const
Definition tinyxml.h:770
int QueryIntValue(int *_value) const
QueryIntValue examines the value string.
Definition tinyxml.cc:1215
int QueryDoubleValue(double *_value) const
QueryDoubleValue examines the value string. See QueryIntValue().
Definition tinyxml.cc:1222
TiXmlAttribute(const char *_name, const char *_value)
Construct an attribute with a name and value.
Definition tinyxml.h:719
void SetIntValue(int _value)
Set the value from an integer.
Definition tinyxml.cc:1229
bool operator<(const TiXmlAttribute &rhs) const
Definition tinyxml.h:769
const char * Name() const
Return the name of this attribute.
Definition tinyxml.h:727
void operator=(const TiXmlAttribute &base)
double DoubleValue() const
Return the value of this attribute, converted to a double.
Definition tinyxml.cc:1256
TiXmlAttribute()
Construct an empty attribute.
Definition tinyxml.h:701
TiXmlAttribute * prev
Definition tinyxml.h:792
void SetName(const char *_name)
Set the name of this attribute.
Definition tinyxml.h:748
virtual void Print(const Ptr< IO::TextWriter > &textWriter, int depth) const
All TinyXml classes can print themselves to a filestream.
Definition tinyxml.cc:1183
void SetDocument(TiXmlDocument *doc)
Definition tinyxml.h:783
int IntValue() const
Return the value of this attribute, converted to an integer.
Definition tinyxml.cc:1251
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:1326
TiXmlDocument * document
Definition tinyxml.h:789
virtual void StreamOut(TIXML_OSTREAM *out) const
Definition tinyxml.cc:1197
TiXmlAttribute * next
Definition tinyxml.h:793
TIXML_STRING value
Definition tinyxml.h:791
TiXmlAttribute(const TiXmlAttribute &)
const TiXmlAttribute * Next() const
Get the next sibling attribute in the DOM. Returns null at end.
Definition tinyxml.cc:1147
const TiXmlAttribute * Previous() const
Get the previous sibling attribute in the DOM. Returns null at beginning.
Definition tinyxml.cc:1165
TIXML_STRING name
Definition tinyxml.h:790
TiXmlAttribute sentinel
Definition tinyxml.h:832
TiXmlAttributeSet()
Definition tinyxml.cc:1504
TiXmlAttribute * First()
Definition tinyxml.h:819
TiXmlAttribute * Last()
Definition tinyxml.h:821
void Add(TiXmlAttribute *attribute)
Definition tinyxml.cc:1518
void Remove(TiXmlAttribute *attribute)
Definition tinyxml.cc:1529
void operator=(const TiXmlAttributeSet &)
const TiXmlAttribute * First() const
Definition tinyxml.h:818
TiXmlAttributeSet(const TiXmlAttributeSet &)
const TiXmlAttribute * Last() const
Definition tinyxml.h:820
~TiXmlAttributeSet()
Definition tinyxml.cc:1511
const TiXmlAttribute * Find(const TIXML_STRING &name) const
Definition tinyxml.cc:1547
char * buffer
Definition tinyxml.h:242
~StringToBuffer()
Definition tinyxml.cc:138
StringToBuffer(const TIXML_STRING &str)
Definition tinyxml.cc:128
TiXmlBase is a base class for every class in TinyXml.
Definition tinyxml.h:152
static void ConvertUTF32ToUTF8(unsigned long input, char *output, int *length)
Definition tinyxmlparser.cc:87
TiXmlCursor location
Definition tinyxml.h:337
static void SetCondenseWhiteSpace(bool condense)
The world does not agree on whether white space should be kept or not.
Definition tinyxml.h:174
void operator=(const TiXmlBase &base)
static const char * ReadName(const char *p, TIXML_STRING *name, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:397
friend class TiXmlNode
Definition tinyxml.h:153
virtual void StreamOut(TIXML_OSTREAM *) const =0
static int IsAlphaNum(unsigned char anyByte, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:149
static bool IsWhiteSpace(int c)
Definition tinyxml.h:250
void * GetUserData()
Definition tinyxml.h:201
static bool condenseWhiteSpace
Definition tinyxml.h:377
static bool StringEqual(const char *p, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:521
static void PutString(const TIXML_STRING &str, TIXML_OSTREAM *out)
Definition tinyxml.cc:36
static const char * GetChar(const char *p, char *_value, int *length, TiXmlEncoding encoding)
Definition tinyxml.h:285
TiXmlBase(const TiXmlBase &)
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)=0
virtual void Print(const Ptr< IO::TextWriter > &textWriter, int depth) const =0
All TinyXml classes can print themselves to a filestream.
static int ToLower(int v, TiXmlEncoding encoding)
Definition tinyxml.h:346
static const char * errorString[TIXML_ERROR_STRING_COUNT]
Definition tinyxml.h:34
static const char * ReadText(const char *in, TIXML_STRING *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:561
@ NUM_ENTITY
Definition tinyxml.h:372
@ MAX_ENTITY_LENGTH
Definition tinyxml.h:373
static Entity entity[NUM_ENTITY]
Definition tinyxml.h:42
void * userData
Field containing a generic user pointer.
Definition tinyxml.h:340
static const char * SkipWhiteSpace(const char *, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:313
static const char * GetEntity(const char *in, char *value, int *length, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:427
TiXmlBase()
Definition tinyxml.h:158
void SetUserData(void *user)
Definition tinyxml.h:200
static const int utf8ByteTable[256]
Definition tinyxml.h:65
int Row() const
Return the position, in the original source file, of this node or attribute.
Definition tinyxml.h:197
virtual ~TiXmlBase()
Definition tinyxml.h:159
int Column() const
See Row()
Definition tinyxml.h:198
static bool IsWhiteSpaceCondensed()
Return the current white space setting.
Definition tinyxml.h:177
static int IsAlpha(unsigned char anyByte, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:128
static bool IsWhiteSpace(char c)
Definition tinyxml.h:246
@ TIXML_ERROR_STRING_COUNT
Definition tinyxml.h:230
@ TIXML_ERROR_READING_END_TAG
Definition tinyxml.h:222
@ TIXML_ERROR_PARSING_UNKNOWN
Definition tinyxml.h:223
@ TIXML_ERROR_PARSING_DECLARATION
Definition tinyxml.h:225
@ TIXML_ERROR_PARSING_ELEMENT
Definition tinyxml.h:217
@ TIXML_ERROR_PARSING_EMPTY
Definition tinyxml.h:221
@ TIXML_ERROR_READING_ATTRIBUTES
Definition tinyxml.h:220
@ TIXML_ERROR_PARSING_COMMENT
Definition tinyxml.h:224
@ TIXML_NO_ERROR
Definition tinyxml.h:213
@ TIXML_ERROR_OUT_OF_MEMORY
Definition tinyxml.h:216
@ TIXML_ERROR_PARSING_CDATA
Definition tinyxml.h:228
@ TIXML_ERROR_DOCUMENT_EMPTY
Definition tinyxml.h:226
@ TIXML_ERROR_OPENING_FILE
Definition tinyxml.h:215
@ TIXML_ERROR
Definition tinyxml.h:214
@ TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME
Definition tinyxml.h:218
@ TIXML_ERROR_EMBEDDED_NULL
Definition tinyxml.h:227
@ TIXML_ERROR_READING_ELEMENT_VALUE
Definition tinyxml.h:219
In correct XML the declaration is the first entry in the file.
Definition tinyxml.h:1129
virtual TiXmlDeclaration * ToDeclaration()
Cast to a more defined type. Will return null not of the requested type.
Definition tinyxml.h:1166
void operator=(const TiXmlDeclaration ©)
Definition tinyxml.cc:1405
const char * Standalone() const
Is this a standalone document?
Definition tinyxml.h:1156
void CopyTo(TiXmlDeclaration *target) const
Definition tinyxml.cc:1450
TIXML_STRING encoding
Definition tinyxml.h:1179
virtual TiXmlNode * Clone() const
Creates a copy of this Declaration and returns it.
Definition tinyxml.cc:1460
TIXML_STRING standalone
Definition tinyxml.h:1180
const char * Encoding() const
Encoding. Will return an empty string if none was found.
Definition tinyxml.h:1154
virtual void StreamOut(TIXML_OSTREAM *out) const
Definition tinyxml.cc:1424
virtual void Print(const Ptr< IO::TextWriter > &textWriter, int depth) const
Print this declaration to a FILE stream.
Definition tinyxml.cc:1412
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:1514
TiXmlDeclaration()
Construct an empty declaration.
Definition tinyxml.h:1132
const char * Version() const
Version. Will return an empty string if none was found.
Definition tinyxml.h:1152
TIXML_STRING version
Definition tinyxml.h:1178
virtual ~TiXmlDeclaration()
Definition tinyxml.h:1149
virtual const TiXmlDeclaration * ToDeclaration() const
Cast to a more defined type. Will return null not of the requested type.
Definition tinyxml.h:1165
Always the top level node.
Definition tinyxml.h:1228
const char * ErrorDesc() const
Contains a textual (english) description of the error if one occurs.
Definition tinyxml.h:1281
int ErrorRow()
Returns the location (if known) of the error.
Definition tinyxml.h:1295
virtual ~TiXmlDocument()
Definition tinyxml.h:1236
bool error
Definition tinyxml.h:1355
TIXML_STRING errorDesc
Definition tinyxml.h:1357
virtual void Print(const Ptr< IO::TextWriter > &textWriter, int depth=0) const
Print this Document to a FILE stream.
Definition tinyxml.cc:1121
bool Error() const
If an error occurs, Error will be set to true.
Definition tinyxml.h:1278
virtual TiXmlNode * Clone() const
Create an exact duplicate of this node and return it.
Definition tinyxml.cc:1110
bool useMicrosoftBOM
Definition tinyxml.h:1360
void SetTabSize(int _tabsize)
SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) to report the correct v...
Definition tinyxml.h:1322
virtual TiXmlDocument * ToDocument()
Cast to a more defined type. Will return null not of the requested type.
Definition tinyxml.h:1342
void SetError(int err, const char *errorLocation, TiXmlParsingData *prevData, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:783
virtual const TiXmlDocument * ToDocument() const
Cast to a more defined type. Will return null not of the requested type.
Definition tinyxml.h:1341
bool LoadStream(const Ptr< IO::Stream > &stream, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
Load a file using the given FILE*.
Definition tinyxml.cc:962
virtual const char * Parse(const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
Parse the given null terminated block of xml data.
Definition tinyxmlparser.cc:689
int TabSize() const
Definition tinyxml.h:1324
virtual void StreamOut(TIXML_OSTREAM *out) const
Definition tinyxml.cc:1131
TiXmlDocument()
Create an empty document, that has no name.
Definition tinyxml.cc:942
TiXmlCursor errorLocation
Definition tinyxml.h:1359
void CopyTo(TiXmlDocument *target) const
Definition tinyxml.cc:1095
void operator=(const TiXmlDocument ©)
Definition tinyxml.cc:955
const TiXmlElement * RootElement() const
Get the root element – the only top level element – of the document.
Definition tinyxml.h:1270
TiXmlElement * RootElement()
Definition tinyxml.h:1271
int ErrorId() const
Generally, you probably want the error string ( ErrorDesc() ).
Definition tinyxml.h:1286
void ClearError()
If you have handled the error, it can be reset with this call.
Definition tinyxml.h:1329
int errorId
Definition tinyxml.h:1356
int ErrorCol()
The column where the error occured. See ErrorRow()
Definition tinyxml.h:1296
int tabsize
Definition tinyxml.h:1358
bool SaveStream(const Ptr< IO::Stream > &stream) const
Save a file using the given FILE*. Returns true if successful.
Definition tinyxml.cc:1072
The element is a container class.
Definition tinyxml.h:841
TiXmlAttribute * FirstAttribute()
Definition tinyxml.h:934
void SetDoubleAttribute(const char *name, double value)
Sets an attribute of name to a given value.
Definition tinyxml.cc:751
int QueryFloatAttribute(const char *name, float *_value) const
QueryFloatAttribute examines the attribute - see QueryIntAttribute().
Definition tinyxml.h:889
void ClearThis()
Definition tinyxml.cc:655
void RemoveAttribute(const char *name)
Deletes an attribute with the given name.
Definition tinyxml.cc:468
TiXmlAttributeSet attributeSet
Definition tinyxml.h:1004
int QueryIntAttribute(const char *name, int *_value) const
QueryIntAttribute examines the attribute - it is an alternative to the Attribute() method with richer...
Definition tinyxml.cc:707
const char * Attribute(const char *name) const
Given an attribute name, Attribute() returns the value for the attribute of that name,...
Definition tinyxml.cc:667
TiXmlAttribute * LastAttribute()
Definition tinyxml.h:936
virtual TiXmlNode * Clone() const
Creates a new Element and returns it - the returned element is a copy.
Definition tinyxml.cc:918
virtual ~TiXmlElement()
Definition tinyxml.cc:649
virtual const TiXmlElement * ToElement() const
Cast to a more defined type. Will return null not of the requested type.
Definition tinyxml.h:982
void CopyTo(TiXmlElement *target) const
Definition tinyxml.cc:895
void SetAttribute(const char *name, const char *_value)
Sets an attribute of name to a given value.
Definition tinyxml.cc:763
const char * ReadValue(const char *in, TiXmlParsingData *prevData, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:1142
const TiXmlAttribute * FirstAttribute() const
Access the first attribute in this element.
Definition tinyxml.h:933
virtual void StreamOut(TIXML_OSTREAM *out) const
Definition tinyxml.cc:864
const TiXmlAttribute * LastAttribute() const
Access the last attribute in this element.
Definition tinyxml.h:935
int QueryDoubleAttribute(const char *name, double *_value) const
QueryDoubleAttribute examines the attribute - see QueryIntAttribute().
Definition tinyxml.cc:718
virtual TiXmlElement * ToElement()
Cast to a more defined type. Will return null not of the requested type.
Definition tinyxml.h:983
const char * GetText() const
Convenience function for easy access to the text inside an element.
Definition tinyxml.cc:929
void operator=(const TiXmlElement &base)
Definition tinyxml.cc:642
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:1022
virtual void Print(const Ptr< IO::TextWriter > &textWriter, int depth) const
All TinyXml classes can print themselves to a filestream.
Definition tinyxml.cc:812
A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly useful thi...
Definition tinyxml.h:1445
TiXmlHandle(const TiXmlHandle &ref)
Copy constructor.
Definition tinyxml.h:1450
TiXmlText * Text() const
Return the handle as a TiXmlText. This may return null.
Definition tinyxml.h:1494
TiXmlHandle Child(const char *value, int index) const
Return a handle to the "index" child with the given name.
Definition tinyxml.cc:1670
TiXmlUnknown * Unknown() const
Return the handle as a TiXmlUnknown. This may return null;.
Definition tinyxml.h:1496
TiXmlHandle(TiXmlNode *_node)
Create a handle from any node (at any depth of the tree.) This can be a null pointer.
Definition tinyxml.h:1448
TiXmlNode * node
Definition tinyxml.h:1499
TiXmlElement * Element() const
Return the handle as a TiXmlElement. This may return null.
Definition tinyxml.h:1492
TiXmlHandle operator=(const TiXmlHandle &ref)
Definition tinyxml.h:1451
TiXmlHandle FirstChildElement() const
Return a handle to the first child element.
Definition tinyxml.cc:1627
TiXmlNode * Node() const
Return the handle as a TiXmlNode. This may return null.
Definition tinyxml.h:1490
TiXmlHandle FirstChild() const
Return a handle to the first child node.
Definition tinyxml.cc:1603
TiXmlHandle ChildElement(const char *value, int index) const
Return a handle to the "index" child element with the given name.
Definition tinyxml.cc:1708
The parent class for everything in the Document Object Model.
Definition tinyxml.h:388
virtual ~TiXmlNode()
Definition tinyxml.cc:156
int Type() const
Query the type (as an enumerated value, above) of this node.
Definition tinyxml.h:626
virtual const TiXmlComment * ToComment() const
Cast to a more defined type. Will return null if not of the requested type.
Definition tinyxml.h:639
const TiXmlElement * FirstChildElement() const
Convenience function to get through elements.
Definition tinyxml.cc:479
TiXmlNode * LinkEndChild(TiXmlNode *addThis)
Add a new node related to this.
Definition tinyxml.cc:194
virtual const TiXmlText * ToText() const
Cast to a more defined type. Will return null if not of the requested type.
Definition tinyxml.h:641
NodeType type
Definition tinyxml.h:672
TiXmlNode * InsertAfterChild(TiXmlNode *afterThis, const TiXmlNode &addThis)
Add a new node related to this.
Definition tinyxml.cc:250
void SetValue(const char *_value)
Changes the value of the node.
Definition tinyxml.h:473
TiXmlNode * next
Definition tinyxml.h:680
const TiXmlNode * Parent() const
Definition tinyxml.h:485
const TiXmlNode * PreviousSibling() const
Navigate to a sibling node.
Definition tinyxml.h:568
const char * Value() const
The meaning of 'value' changes for the specific type of TiXmlNode.
Definition tinyxml.h:454
const TiXmlNode * NextSibling() const
Navigate to a sibling node.
Definition tinyxml.h:583
TiXmlNode * LastChild()
The last child of this node. Will be null if there are no children.
Definition tinyxml.h:493
TiXmlNode * ReplaceChild(TiXmlNode *replaceThis, const TiXmlNode &withThis)
Replace a child of this node.
Definition tinyxml.cc:276
virtual const TiXmlDeclaration * ToDeclaration() const
Cast to a more defined type. Will return null if not of the requested type.
Definition tinyxml.h:642
TiXmlNode * lastChild
Definition tinyxml.h:675
TiXmlNode(const TiXmlNode &)
TiXmlNode * parent
Definition tinyxml.h:671
const TiXmlNode * IterateChildren(const TiXmlNode *previous) const
An alternate way to walk the children of a node.
Definition tinyxml.cc:372
virtual TiXmlComment * ToComment()
Cast to a more defined type. Will return null if not of the requested type.
Definition tinyxml.h:646
void Clear()
Delete all the children of this node. Does not affect 'this'.
Definition tinyxml.cc:177
TiXmlNode * InsertBeforeChild(TiXmlNode *beforeThis, const TiXmlNode &addThis)
Add a new node related to this.
Definition tinyxml.cc:224
virtual TiXmlDocument * ToDocument()
Cast to a more defined type. Will return null if not of the requested type.
Definition tinyxml.h:644
virtual const TiXmlDocument * ToDocument() const
Cast to a more defined type. Will return null if not of the requested type.
Definition tinyxml.h:637
NodeType
The types of XML nodes supported by TinyXml.
Definition tinyxml.h:430
@ DOCUMENT
Definition tinyxml.h:431
@ TEXT
Definition tinyxml.h:435
@ COMMENT
Definition tinyxml.h:433
@ TYPECOUNT
Definition tinyxml.h:437
@ ELEMENT
Definition tinyxml.h:432
@ DECLARATION
Definition tinyxml.h:436
@ UNKNOWN
Definition tinyxml.h:434
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.
Definition tinyxml.h:649
TiXmlNode * FirstChild()
Definition tinyxml.h:488
virtual TiXmlText * ToText()
Cast to a more defined type. Will return null if not of the requested type.
Definition tinyxml.h:648
const TiXmlNode * LastChild() const
Definition tinyxml.h:492
TiXmlNode * Parent()
One step up the DOM.
Definition tinyxml.h:484
virtual const TiXmlUnknown * ToUnknown() const
Cast to a more defined type. Will return null if not of the requested type.
Definition tinyxml.h:640
TiXmlNode * prev
Definition tinyxml.h:679
virtual TiXmlUnknown * ToUnknown()
Cast to a more defined type. Will return null if not of the requested type.
Definition tinyxml.h:647
void operator=(const TiXmlNode &base)
void CopyTo(TiXmlNode *target) const
Definition tinyxml.cc:170
friend class TiXmlElement
Definition tinyxml.h:390
bool NoChildren() const
Returns true if this node has no children.
Definition tinyxml.h:635
friend TIXML_OSTREAM & operator<<(TIXML_OSTREAM &out, const TiXmlNode &base)
Definition tinyxml.cc:1584
TiXmlNode * Identify(const char *start, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:803
const TiXmlElement * NextSiblingElement() const
Convenience function to get through elements.
Definition tinyxml.cc:535
virtual TiXmlElement * ToElement()
Cast to a more defined type. Will return null if not of the requested type.
Definition tinyxml.h:645
TiXmlNode * PreviousSibling()
Definition tinyxml.h:569
virtual const TiXmlElement * ToElement() const
Cast to a more defined type. Will return null if not of the requested type.
Definition tinyxml.h:638
const TiXmlDocument * GetDocument() const
Return a pointer to the Document this node lives in.
Definition tinyxml.cc:592
bool RemoveChild(TiXmlNode *removeThis)
Delete a child of this node.
Definition tinyxml.cc:304
const TiXmlNode * FirstChild() const
The first child of this node. Will be null if there are no children.
Definition tinyxml.h:487
TIXML_STRING value
Definition tinyxml.h:677
TiXmlNode * NextSibling()
Definition tinyxml.h:584
TiXmlNode * InsertEndChild(const TiXmlNode &addThis)
Add a new node related to this.
Definition tinyxml.cc:214
TiXmlNode * firstChild
Definition tinyxml.h:674
Definition tinyxmlparser.cc:171
XML text.
Definition tinyxml.h:1053
bool Blank() const
Definition tinyxmlparser.cc:1573
bool cdata
Definition tinyxml.h:1110
virtual TiXmlText * ToText()
Cast to a more defined type. Will return null not of the requested type.
Definition tinyxml.h:1095
void CopyTo(TiXmlText *target) const
Definition tinyxml.cc:1353
bool CDATA()
Queries whether this represents text using a CDATA section.
Definition tinyxml.h:1083
virtual const TiXmlText * ToText() const
Cast to a more defined type. Will return null not of the requested type.
Definition tinyxml.h:1094
virtual ~TiXmlText()
Definition tinyxml.h:1065
TiXmlText(const TiXmlText ©)
Definition tinyxml.h:1076
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:1440
void SetRaw(bool _raw)
Turns on or off a raw representation of text.
Definition tinyxml.h:1090
virtual TiXmlNode * Clone() const
[internal use] Creates a new Element and returns it.
Definition tinyxml.cc:1361
void SetCDATA(bool _cdata)
Turns on or off a CDATA representation of text.
Definition tinyxml.h:1085
virtual void Print(const Ptr< IO::TextWriter > &textWriter, int depth) const
Write this text object to a FILE stream.
Definition tinyxml.cc:1311
virtual void StreamOut(TIXML_OSTREAM *out) const
Definition tinyxml.cc:1340
bool Raw()
Queries whether the text in this node is raw, meaning that it shouldn't be treated by any encoding.
Definition tinyxml.h:1088
bool raw
Definition tinyxml.h:1111
void operator=(const TiXmlText &base)
Definition tinyxml.h:1077
TiXmlText(const char *initValue)
Constructor for text element.
Definition tinyxml.h:1060
Any tag that tinyXml doesn't recognize is saved as an unknown.
Definition tinyxml.h:1192
virtual TiXmlNode * Clone() const
Creates a copy of this Unknown and returns it.
Definition tinyxml.cc:1492
virtual TiXmlUnknown * ToUnknown()
Cast to a more defined type. Will return null not of the requested type.
Definition tinyxml.h:1208
void operator=(const TiXmlUnknown ©)
Definition tinyxml.h:1198
virtual void Print(const Ptr< IO::TextWriter > &textWriter, int depth) const
Print this Unknown to a FILE stream.
Definition tinyxml.cc:1472
virtual const TiXmlUnknown * ToUnknown() const
Cast to a more defined type. Will return null not of the requested type.
Definition tinyxml.h:1207
TiXmlUnknown()
Definition tinyxml.h:1194
virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
Definition tinyxmlparser.cc:1239
virtual void StreamOut(TIXML_OSTREAM *out) const
Definition tinyxml.cc:1480
TiXmlUnknown(const TiXmlUnknown ©)
Definition tinyxml.h:1197
virtual ~TiXmlUnknown()
Definition tinyxml.h:1195
void CopyTo(TiXmlUnknown *target) const
Definition tinyxml.cc:1486
bool SaveFile(Util::String const &title, const IO::URI &start, std::initializer_list< const char * >const &filters, Util::String &path)
Save file dialog.
Definition filedialog.cc:67
unsigned int strLength
Definition tinyxml.h:367
char chr
Definition tinyxml.h:368
const char * str
Definition tinyxml.h:366
void Clear()
Definition tinyxml.h:103
int col
Definition tinyxml.h:106
int row
Definition tinyxml.h:105
TiXmlCursor()
Definition tinyxml.h:102
const int TIXML_PATCH_VERSION
Definition tinyxml.h:95
const int TIXML_MAJOR_VERSION
Definition tinyxml.h:93
const int TIXML_MINOR_VERSION
Definition tinyxml.h:94
#define TIXML_OSTREAM
Definition tinyxml.h:57
TiXmlEncoding
Definition tinyxml.h:121
@ TIXML_ENCODING_UNKNOWN
Definition tinyxml.h:122
@ TIXML_ENCODING_LEGACY
Definition tinyxml.h:124
@ TIXML_ENCODING_UTF8
Definition tinyxml.h:123
#define TIXML_STRING
Definition tinyxml.h:56
@ TIXML_WRONG_TYPE
Definition tinyxml.h:115
@ TIXML_SUCCESS
Definition tinyxml.h:113
@ TIXML_NO_ATTRIBUTE
Definition tinyxml.h:114
const TiXmlEncoding TIXML_DEFAULT_ENCODING
Definition tinyxml.h:127