diff --git a/code/nel/include/nel/misc/xml_auto_ptr.h b/code/nel/include/nel/misc/xml_auto_ptr.h
new file mode 100644
index 000000000..36e67331b
--- /dev/null
+++ b/code/nel/include/nel/misc/xml_auto_ptr.h
@@ -0,0 +1,81 @@
+// Ryzom - MMORPG Framework
+// Copyright (C) 2010 Winch Gate Property Limited
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as
+// published by the Free Software Foundation, either version 3 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+
+
+
+#ifndef XML_AUTO_PTR_H
+#define XML_AUTO_PTR_H
+
+#include
+
+/** Simple auto pointer for xml pointers
+ */
+class CXMLAutoPtr
+{
+public:
+ CXMLAutoPtr(const char *value = NULL) : _Value(value) {}
+ CXMLAutoPtr(const unsigned char *value) : _Value((const char *) value) {}
+ ~CXMLAutoPtr() { destroy(); }
+ operator const char *() const { return _Value; }
+ operator bool() const { return _Value != NULL; }
+ operator std::string() const { return std::string(_Value); }
+ bool operator ! () const { return _Value == NULL; }
+ operator const unsigned char *() const { return (const unsigned char *) _Value; }
+ char operator * () const { nlassert(_Value); return *_Value; }
+ /// NB : This remove previous owned pointer with xmlFree
+ CXMLAutoPtr &operator = (const char *other)
+ {
+ if (other == _Value) return *this;
+ destroy();
+ _Value = other;
+ return *this;
+ }
+
+ CXMLAutoPtr &operator = (const unsigned char *other)
+ {
+ *this = (const char *) other;
+ return *this;
+ }
+ char *getDatas() const { return const_cast(_Value); }
+//////////////////////////////////////////////////
+private:
+ const char *_Value;
+private:
+ void destroy()
+ {
+ if (_Value)
+ {
+ xmlFree(const_cast(_Value));
+ _Value = NULL;
+ }
+ }
+
+ // We'd rather avoid problems
+ CXMLAutoPtr(const CXMLAutoPtr &/* other */)
+ {
+ nlassert(0);
+ }
+ CXMLAutoPtr&operator = (const CXMLAutoPtr &/* other */)
+ {
+ nlassert(0);
+ return *this;
+ }
+};
+
+
+#endif
+
+
diff --git a/code/nel/src/misc/stdmisc.h b/code/nel/src/misc/stdmisc.h
index 572a90f1a..860983518 100644
--- a/code/nel/src/misc/stdmisc.h
+++ b/code/nel/src/misc/stdmisc.h
@@ -52,6 +52,7 @@
#include "nel/misc/stream.h"
#include "nel/misc/path.h"
#include "nel/misc/string_common.h"
+//#include "nel/misc/xml_auto_ptr.h"
#ifdef NL_OS_WINDOWS
#define NOMINMAX
diff --git a/code/ryzom/client/src/cdb_branch.cpp b/code/ryzom/client/src/cdb_branch.cpp
index 60c6b63f4..d7e3f185f 100644
--- a/code/ryzom/client/src/cdb_branch.cpp
+++ b/code/ryzom/client/src/cdb_branch.cpp
@@ -30,7 +30,7 @@
//////////////
#include "cdb_branch.h"
#include "cdb_leaf.h"
-#include "game_share/xml_auto_ptr.h"
+#include "nel/misc/xml_auto_ptr.h"
//#include
#include "interface_v3/interface_manager.h"
diff --git a/code/ryzom/client/src/cdb_leaf.cpp b/code/ryzom/client/src/cdb_leaf.cpp
index 9b3d26c89..b65f79c24 100644
--- a/code/ryzom/client/src/cdb_leaf.cpp
+++ b/code/ryzom/client/src/cdb_leaf.cpp
@@ -29,7 +29,7 @@
// Includes //
//////////////
#include "cdb_leaf.h"
-#include "game_share/xml_auto_ptr.h"
+#include "nel/misc/xml_auto_ptr.h"
//#include
#include "interface_v3/interface_manager.h"
diff --git a/code/ryzom/client/src/interface_v3/action_handler.h b/code/ryzom/client/src/interface_v3/action_handler.h
index c8800da63..e578c4959 100644
--- a/code/ryzom/client/src/interface_v3/action_handler.h
+++ b/code/ryzom/client/src/interface_v3/action_handler.h
@@ -23,7 +23,7 @@
#include
#include "nel/misc/types_nl.h"
#include "nel/misc/debug.h"
-#include "game_share/xml_auto_ptr.h"
+#include "nel/misc/xml_auto_ptr.h"
#include