*/
+#include "cxml.h"
+#include <libxml++/libxml++.h>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
-#include <libxml++/libxml++.h>
-#include "cxml.h"
+#include <cstdio>
using std::string;
using std::list;
return y;
}
+template<>
+unsigned int
+locale_convert (string x)
+{
+ unsigned int y = 0;
+ sscanf (x.c_str(), "%u", &y);
+ return y;
+}
+
+template<>
+long int
+locale_convert (string x)
+{
+ long int y = 0;
+ sscanf (x.c_str(), "%ld", &y);
+ return y;
+}
+
+template<>
+long long
+locale_convert (string x)
+{
+ long long y = 0;
+#ifdef LIBCXML_WINDOWS
+ __mingw_sscanf (x.c_str(), "%lld", &y);
+#else
+ sscanf (x.c_str(), "%lld", &y);
+#endif
+ return y;
+}
+
template<>
float
locale_convert (string x)
return locale_convert<int> (make_local(v));
}
+template <>
+long int
+cxml::raw_convert (string v)
+{
+ return locale_convert<long int> (make_local(v));
+}
+
+template <>
+long long
+cxml::raw_convert (string v)
+{
+ return locale_convert<long long> (make_local(v));
+}
+
+template <>
+unsigned int
+cxml::raw_convert (string v)
+{
+ return locale_convert<unsigned int> (make_local(v));
+}
+
template <>
float
cxml::raw_convert (string v)