
7 Feb
2012
7 Feb
'12
9:10 p.m.
I'm trying to make all of the strings (xml tags and attributes) contained within a property tree be case insensitive, to make comparison easy and consistent. Here's an example: boost::property_tree::iptree pt; read_xml( file, pt, boost::property_tree::xml_parser::trim_whitespace ); // case insensitive std::string name = v.second.getstd::string("<xmlattr>.nAmE"); // case insensitive BOOST_FOREACH( boost::property_tree::iptree::value_type const& v, pt.get_child("neTwOrK") ) { // fails comparison because "thing" is case sensitive. if ( v.first == "tHiNg" ) { .... } } Is it possible to make v.first case insensitive as well? Thanks, Brad