Andrej - 2002-08-26

I wonder why there is no ignore_xml_tag_case support. So I did one, here is a patch for tinyxml.cpp and tinyxml.h. Diff file was generated using (cvs -d:pserver:anonymous@cvs.TinyXml.sourceforge.net:/cvsroot/tinyxml -z8 diff -w tinyxml.cpp tinyxml.h) in tinyxml directory.
Is uses stricmp instead of std::string opeerator ==.
Enjoy.
a.

Index: tinyxml.cpp

RCS file: /cvsroot/tinyxml/tinyxml/tinyxml.cpp,v
retrieving revision 1.36
diff -w -r1.36 tinyxml.cpp
300c300,301
<         if ( node->SValue() == TIXML_STRING( value ))
---
>         //if ( node->SValue() == TIXML_STRING( value ))
>         if ( !stricmp( node->Value(), value))
311c312,313
<         if ( node->SValue() == TIXML_STRING (value))
---
>         //if ( node->SValue() == TIXML_STRING (value))
>         if ( !stricmp(node->Value(),value))
348c350,351
<         if ( node->SValue() == TIXML_STRING (value))
---
>         //if ( node->SValue() == TIXML_STRING (value))
>         if ( !stricmp(node->Value(),value))
360c363,364
<         if ( node->SValue() == TIXML_STRING (value))
---
>         //if ( node->SValue() == TIXML_STRING (value))
>         if ( !stricmp(node->Value(),value))
467c471,472
<     TiXmlAttribute* node = attributeSet.Find( name );
---
>     //TiXmlAttribute* node = attributeSet.Find( name );
>     TiXmlAttribute* node = attributeSet.Find( name, true);
1038c1043,1044
< TiXmlAttribute*    TiXmlAttributeSet::Find( const char * name ) const
---
> //TiXmlAttribute*    TiXmlAttributeSet::Find( const char * name ) const
> TiXmlAttribute*    TiXmlAttributeSet::Find( const char * name, bool ignorecase) const
1043a1050
>         /*
1045a1053,1062
>         */
>         if (ignorecase){
>             if (!stricmp((node->name).c_str(),name)){
>                 return(node);
>             }
>         } else {
>             if ( node->name == name ){
>                 return node;
>             }
>         }
Index: tinyxml.h
===================================================================
RCS file: /cvsroot/tinyxml/tinyxml/tinyxml.h,v
retrieving revision 1.30
diff -w -r1.30 tinyxml.h
24a25
> #define TIXML_USE_STL
36a38
> #ifndef TIXML_USE_STL
37a40
> #endif
54a58
>     #include <iostream>
187c191,192
<                                 bool ignoreCase );
---
>                                 bool ignoreCase = true );
>     //                            bool ignoreCase );
593c598,599
<     TiXmlAttribute*    Find( const char * name ) const;
---
>     TiXmlAttribute*    Find( const char * name, bool ignorecase = false ) const;
>     //TiXmlAttribute*    Find( const char * name ) const;