support IntText(),UnsignedText(),Int64Text() for hex value
diff --git a/tinyxml2.h b/tinyxml2.h
index a432f7e..9646e85 100755
--- a/tinyxml2.h
+++ b/tinyxml2.h
@@ -590,6 +590,13 @@
|| ch == '-';
}
+ inline static bool IsPrefixHex( const char* p) {
+ while (p && *p != '\0' && !isdigit(*p)) {
+ ++p;
+ }
+ return *p == '0' && ( *(p + 1) == 'x' || *(p + 1) == 'X');
+ }
+
inline static bool StringEqual( const char* p, const char* q, int nChar=INT_MAX ) {
if ( p == q ) {
return true;
@@ -1478,7 +1485,7 @@
XMLAttribute* a = FindOrCreateAttribute(name);
a->SetAttribute(value);
}
-
+
/// Sets the named attribute to value.
void SetAttribute( const char* name, bool value ) {
XMLAttribute* a = FindOrCreateAttribute( name );