Index: XMLIO_V2/dev/dev_rv/src/xmlio/array_impl.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/array_impl.hpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/array_impl.hpp	(revision 173)
@@ -1,4 +1,6 @@
 #ifndef __XMLIO_CArray_impl__
 #define __XMLIO_CArray_impl__
+
+#include "array_mac.hpp"
 
 namespace xmlioserver
@@ -41,8 +43,33 @@
 
    template <typename ValueType, StdSize NumDims, typename Allocator>
-      StdOStream & operator << (StdOStream & os,
-                                const boost::shared_ptr<CArray<ValueType, NumDims, Allocator> > & array)
-   { os << *array; return (os); }
+      StdOStream & operator << 
+         (StdOStream & os, const boost::shared_ptr<CArray<ValueType, NumDims, Allocator> > & array)
+   { 
+      os << *array; 
+      return (os); 
+   }
+   
+   //----------------------------------------------------------------
+   
+   template <typename ValueType> void FromBinary
+         (StdIStream & is, ARRAY(ValueType, 1) & array)
+   {
+      ARRAY_ASSIGN(array, ValueType, 1, [1]);
+      array->fromBinary(is);
+   }
+   
+   template <typename ValueType> void FromBinary
+         (StdIStream & is, ARRAY(ValueType, 2) & array)
+   {
+      ARRAY_ASSIGN(array, ValueType, 2, [1][1]);
+      array->fromBinary(is);
+   }
 
+   template <typename ValueType> void FromBinary
+         (StdIStream & is, ARRAY(ValueType, 3) & array)
+   {
+      ARRAY_ASSIGN(array, ValueType, 3, [1][1][1]);
+      array->fromBinary(is);
+   }
    //----------------------------------------------------------------
 
Index: XMLIO_V2/dev/dev_rv/src/xmlio/attribute_map.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/attribute_map.cpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/attribute_map.cpp	(revision 173)
@@ -161,6 +161,6 @@
             if (!this->hasAttribute(key))
                ERROR("CAttributeMap::fromBinary(StdIStream & is)",
-                     << "[ key = " << key << "] key not found !"); 
-                     
+                     << "[ key = " << key << "] key not found !");
+                                        
             is.read (reinterpret_cast<char*>(&hasValue), sizeof(bool));
             
Index: XMLIO_V2/dev/dev_rv/src/xmlio/attribute_template.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/attribute_template.hpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/attribute_template.hpp	(revision 173)
@@ -53,5 +53,5 @@
 
             virtual void toBinary  (StdOStream & os) const;
-            virtual void fromBinary(StdIStream & is);
+            virtual void fromBinary(StdIStream & is);            
 
          protected :
@@ -60,7 +60,10 @@
             CAttributeTemplate(void); // Not implemented.
 
-      }; // class CAttribute
-
+      }; // class CAttribute    
+      
    } // namespace tree
+   
+   template <class T>  void FromBinary(StdIStream & is, T & obj);
+   
 } // namespace xmlioserver
 
Index: XMLIO_V2/dev/dev_rv/src/xmlio/attribute_template_impl.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/attribute_template_impl.hpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/attribute_template_impl.hpp	(revision 173)
@@ -1,4 +1,6 @@
 #ifndef __XMLIO_CAttributeTemplate_impl__
 #define __XMLIO_CAttributeTemplate_impl__
+
+#include "array.hpp"
 
 namespace xmlioserver
@@ -102,5 +104,7 @@
          void CAttributeTemplate<T>::fromBinary(StdIStream & is)
       {
-         this->getValue()->fromBinary(is);
+         T value;
+         FromBinary(is, value);
+         this->setValue(value);
       }
 
Index: XMLIO_V2/dev/dev_rv/src/xmlio/group_template_impl.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/group_template_impl.hpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/group_template_impl.hpp	(revision 173)
@@ -160,5 +160,5 @@
                      ? V::GetName() : V::GetDefName();
 
-      oss << "< " << name << " ";
+      oss << "<" << name << " ";
       if (this->hasId() && (this->getId().compare(V::GetDefName()) != 0))
          oss << " id=\"" << this->getId() << "\" ";
@@ -185,5 +185,5 @@
          }
             
-         oss << "</ " << name << " >";
+         oss << "</" << name << " >";
       }
       else
Index: XMLIO_V2/dev/dev_rv/src/xmlio/indent.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/indent.cpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/indent.cpp	(revision 173)
@@ -10,5 +10,5 @@
    unsigned int CIndent::Indent   = 0;
    StdString    CIndent::Increm   = StdString("   ");
-   bool         CIndent::WithLine = true;
+   bool         CIndent::WithLine = false;
 
    StdOStream & CIndent::NIndent(StdOStream& out)
@@ -42,5 +42,5 @@
              line.find(xml::CXMLNode::GetRootName()) != StdString::npos)
             retvalue << CIndent::NIndent << line <<  std::endl;
-         else if (line.find("</ ") != StdString::npos)
+         else if (line.find("</") != StdString::npos)
             retvalue << CIndent::NIndent   << line << CIndent::DecEndl << std::endl;
          else if (line.find(" />") != StdString::npos)
Index: XMLIO_V2/dev/dev_rv/src/xmlio/main_server.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/main_server.cpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/main_server.cpp	(revision 173)
@@ -13,84 +13,21 @@
    {
       comm::CMPIManager::Initialise(&argc, &argv); // < seulement en mode connectÃ©
+
+      //CTreeManager::ParseFile  ("test/iodef_simple_test.xml");
+            
+      /*StdOFStream ofs("data/data.bin");
+      CTreeManager::ToBinary(ofs);
+      ofs.close();*/
       
-      // CrÃ©ation d'un contexte
-      boost::shared_ptr<CContext> contxt = CTreeManager::CreateContext("mon_context");
+      StdIFStream ifs("data/data.bin");    
+      CTreeManager::FromBinary(ifs);
+      ifs.close();
       
-      
-      boost::shared_ptr<CGridGroup>   grid_def   = 
-         CObjectFactory::GetObject<CGridGroup>(StdString("grid_definition"));
-      boost::shared_ptr<CAxisGroup>   axis_def   = 
-         CObjectFactory::GetObject<CAxisGroup>(StdString("axis_definition"));
-      boost::shared_ptr<CDomainGroup> domain_def = 
-         CObjectFactory::GetObject<CDomainGroup>(StdString("domain_definition"));
-      
-      // Ajout d'une grille, d'un axe et d'un domaine.
-      boost::shared_ptr<CGrid>   grid   = 
-         CGroupFactory::CreateChild(grid_def  , StdString("ma_grille"));
-      boost::shared_ptr<CAxis>   axis   = 
-         CGroupFactory::CreateChild(axis_def  , StdString("mon_axe"));
-      boost::shared_ptr<CDomain> domain = 
-         CGroupFactory::CreateChild(domain_def, StdString("mon_domaine"));
-         
-      boost::shared_ptr<CDomain> sdomain = 
-         CGroupFactory::CreateChild(domain_def, StdString("mon_super_domaine"));
-      
-      // DÃ©finition des attributs de la grille.
-      grid->domain_ref.setValue(StdString("mon_domaine"));
-      grid->axis_ref.setValue(StdString("mon_axe"));
-      
-      // DÃ©finition des attributs de l'axe.
-      ARRAY_CREATE(zvalue, double, 1, [10]);
-           
-      axis->size.setValue(zvalue->num_elements());
-      axis->zvalue.setValue(zvalue);
-      
-      // DÃ©finition des attributs du domaine l'axe.
-      ARRAY_CREATE(latvalue, double, 1, [200]);
-      ARRAY_CREATE(lonvalue, double, 1, [200]);
-      
-      ARRAY_CREATE(mask, bool, 2, [20][10]);
-      
-      for (StdSize i = 0; i<mask->num_elements(); i++)
-         (mask->data())[i] = i%2;
-      
-      domain->ni_glo.setValue(40);
-      domain->nj_glo.setValue(40);
-      
-      domain->ibegin.setValue(1);
-      domain->ni.setValue(20);      
-      domain->jbegin.setValue(1);
-      domain->nj.setValue(10);
-      
-      domain->data_dim.setValue(2);
-      
-      domain->mask.setValue(mask);
-      domain->lonvalue.setValue(lonvalue);
-      domain->latvalue.setValue(latvalue);
-           
-      // RÃ©solution
-      grid->solveReference();
-      
-      std::cout << grid->storeIndex  << std::endl;
-      std::cout << grid->out_i_index << std::endl;
-      std::cout << grid->out_j_index << std::endl;
-      std::cout << grid->out_l_index << std::endl;
+      StdIFStream ifss("data/data.bin");    
+      CTreeManager::FromBinary(ifss);
+      ifss.close();
       
       // Sortie de l'arborescence xml sous forme de fichier.
       CTreeManager::PrintTreeToFile("data/def/test.xml");
-      
-      
-      ARRAY_CREATE(sarray, double, 1, [1]);
-      StdIFStream ifs("data/monfichierbinaire");
-      sarray->fromBinary(ifs);
-      ifs.close();
-      
-     
-     
-     
-     
-     
-     
-     
      
      
Index: XMLIO_V2/dev/dev_rv/src/xmlio/manager/tree_manager.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/manager/tree_manager.cpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/manager/tree_manager.cpp	(revision 173)
@@ -21,8 +21,9 @@
          boost::shared_ptr<CContextGroup> group_context = CContext::GetContextGroup();
          CTreeManager::SetCurrentContextId(id);
+         bool hasctxt = CObjectFactory::HasObject<CContext>(id);
          
          boost::shared_ptr<tree::CContext> context =
                CObjectFactory::CreateObject<tree::CContext>(id);
-         CGroupFactory::AddChild(group_context, context);
+         if (!hasctxt) CGroupFactory::AddChild(group_context, context);
 
 #define DECLARE_NODE(Name_, name_) \
@@ -59,11 +60,101 @@
 
       void CTreeManager::ParseFile(const StdString & filename)
-      { xml::CXMLParser::ParseFile(filename); }
+      { 
+         xml::CXMLParser::ParseFile(filename); 
+      }
 
       void CTreeManager::ParseString(const StdString & xmlContent)
-      { xml::CXMLParser::ParseString(xmlContent); }
+      { 
+         xml::CXMLParser::ParseString(xmlContent); 
+      }
 
       void CTreeManager::ParseStream(StdIStream & stream)
-      { xml::CXMLParser::ParseStream(stream); }
+      { 
+         xml::CXMLParser::ParseStream(stream); 
+      }
+      
+      //--------------------------------------------------------------
+      
+      void CTreeManager::ToBinary(StdOStream & os)
+      {
+         StdString currentContextId =
+            CObjectFactory::GetCurrentContextId();
+         std::vector<boost::shared_ptr<CContext> > def_vector =
+            CContext::GetContextGroup()->getChildList();
+            
+         const StdSize size = def_vector.size();         
+         const ENodeType cenum = CContext::GetType();
+         const ENodeType genum = CContextGroup::GetType();
+         
+         os.write (reinterpret_cast<const char*>(&genum) , sizeof(ENodeType)); 
+         os.write (reinterpret_cast<const char*>(&size) , sizeof(StdSize));
+         
+         for (StdSize i = 0; i < size; i++)
+         {
+            boost::shared_ptr<CContext> context = def_vector[i];         
+            CTreeManager::SetCurrentContextId(context->getId());                
+            const bool hid = context->hasId(); // Toujours vrai
+            
+            os.write (reinterpret_cast<const char*>(&cenum), sizeof(ENodeType));      
+            os.write (reinterpret_cast<const char*>(&hid), sizeof(bool));
+            
+            if (hid)
+            {
+               const StdString & id = context->getId();
+               const StdSize size   = id.size();
+                  
+               os.write (reinterpret_cast<const char*>(&size), sizeof(StdSize));
+               os.write (id.data(), size * sizeof(char));         
+            } 
+            
+            context->toBinary(os);
+         }
+         CTreeManager::SetCurrentContextId(currentContextId);          
+      }
+      
+      void CTreeManager::FromBinary(StdIStream & is)
+      {
+         StdSize ctxtnb = 0;
+         ENodeType renum = Unknown;
+         
+         boost::shared_ptr<CContextGroup> group_context =
+                           CContext::GetContextGroup();
+                           
+         is.read (reinterpret_cast<char*>(&renum), sizeof(StdSize));   
+         is.read (reinterpret_cast<char*>(&ctxtnb), sizeof(ENodeType));
+
+         if (renum != CContextGroup::GetType())
+            ERROR("CTreeManager::FromBinary(StdIStream & is)",
+                  << "[ renum = " << renum << "] Bad type !");
+
+         for (StdSize i = 0; i < ctxtnb; i++)
+         {
+            bool hid = false;
+            is.read (reinterpret_cast<char*>(&renum), sizeof(tree::ENodeType));
+            is.read (reinterpret_cast<char*>(&hid), sizeof(bool));
+            
+            if (renum != CContext::GetType())
+               ERROR("CTreeManager::FromBinary(StdIStream & is)",
+                     << "[ renum = " << renum << "] Bad type !");
+                           
+            if (hid)
+            {
+               StdSize size  = 0;
+               is.read (reinterpret_cast<char*>(&size), sizeof(StdSize));
+               StdString id(size, ' ');
+               is.read (const_cast<char *>(id.data()), size * sizeof(char));
+               
+               CTreeManager::SetCurrentContextId(id);               
+               bool hasctxt = CObjectFactory::HasObject<CContext>(id);
+               
+               boost::shared_ptr<CContext> context =
+                  CObjectFactory::CreateObject<CContext>(id);
+                  
+               if (!hasctxt)
+                  CGroupFactory::AddChild(group_context, context);
+               context->fromBinary(is);
+            }
+         }
+      }
 
       ///-------------------------------------------------------------
Index: XMLIO_V2/dev/dev_rv/src/xmlio/manager/tree_manager.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/manager/tree_manager.hpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/manager/tree_manager.hpp	(revision 173)
@@ -33,4 +33,8 @@
             static void ParseString(const StdString & xmlContent);
             static void ParseStream(StdIStream & stream);
+            
+            /// Binaire ///
+            static void ToBinary  (StdOStream & os);
+            static void FromBinary(StdIStream & is);
 
       }; // class CTreeManager
Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/context.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/context.cpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/context.cpp	(revision 173)
@@ -1,3 +1,5 @@
 #include "context.hpp"
+
+#include "tree_manager.hpp"
 
 #include "attribute_template_impl.hpp"
@@ -64,10 +66,10 @@
                     << " ce dernier ne sera pas pris en compte lors du traitement !"); }
 
-   #define DECLARE_NODE(Name_, name_)    \
-      if (name.compare(C##Name_##Definition::GetDefName()) == 0) \
-      { CObjectFactory::CreateObject<C##Name_##Definition>(C##Name_##Definition::GetDefName()) -> parse(node); \
+#define DECLARE_NODE(Name_, name_)    \
+   if (name.compare(C##Name_##Definition::GetDefName()) == 0) \
+   { CObjectFactory::CreateObject<C##Name_##Definition>(C##Name_##Definition::GetDefName()) -> parse(node); \
    continue; }
-   #define DECLARE_NODE_PAR(Name_, name_)
-   #include "node_type.conf"
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
 
             DEBUG(<< "L'Ã©lÃ©ment nommÃ© \'"     << name
@@ -93,20 +95,60 @@
 
       out << "<? xml version=\"1.0\" ?>" << std::endl;
-      out << "< "  << xml::CXMLNode::GetRootName() << " >" << std::endl;
+      out << "<"  << xml::CXMLNode::GetRootName() << " >" << std::endl;
       
       for (; it != end; it++)
       {
-         boost::shared_ptr<CContext> context = *it;
-         CObjectFactory::SetCurrentContextId(context->getId());
-         CGroupFactory::SetCurrentContextId(context->getId());
+         boost::shared_ptr<CContext> context = *it;         
+         CTreeManager::SetCurrentContextId(context->getId());         
          out << *context << std::endl;
       }
       
-      out << "</ " << xml::CXMLNode::GetRootName() << " >" << std::endl;
-
-      CObjectFactory::SetCurrentContextId(currentContextId);
-       CGroupFactory::SetCurrentContextId(currentContextId);
-   }
-
+      out << "</" << xml::CXMLNode::GetRootName() << " >" << std::endl;
+      CTreeManager::SetCurrentContextId(currentContextId);  
+   }
+   
+   //----------------------------------------------------------------
+   
+   void CContext::toBinary(StdOStream & os) const
+   {
+      SuperClass::toBinary(os);
+       
+#define DECLARE_NODE(Name_, name_)                                         \
+   {                                                                       \
+      ENodeType renum = C##Name_##Definition::GetType();                   \
+      bool val = CObjectFactory::HasObject<C##Name_##Definition>           \
+                     (C##Name_##Definition::GetDefName());                 \
+      os.write (reinterpret_cast<const char*>(&renum), sizeof(ENodeType)); \
+      os.write (reinterpret_cast<const char*>(&val), sizeof(bool));        \
+      if (val) CObjectFactory::GetObject<C##Name_##Definition>             \
+                     (C##Name_##Definition::GetDefName())->toBinary(os);   \
+   }   
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
+   }
+   
+   //----------------------------------------------------------------
+   
+   void CContext::fromBinary(StdIStream & is)
+   {
+      SuperClass::fromBinary(is);
+#define DECLARE_NODE(Name_, name_)                                         \
+   {                                                                       \
+      bool val = false;                                                    \
+      ENodeType renum = Unknown;                                           \
+      is.read (reinterpret_cast<char*>(&renum), sizeof(ENodeType));        \
+      is.read (reinterpret_cast<char*>(&val), sizeof(bool));               \
+      if (renum != C##Name_##Definition::GetType())                        \
+         ERROR("CContext::fromBinary(StdIStream & is)",                    \
+               << "[ renum = " << renum << "] Bad type !");                \
+      if (val) CObjectFactory::CreateObject<C##Name_##Definition>          \
+                  (C##Name_##Definition::GetDefName()) -> fromBinary(is);  \
+   }   
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
+      
+   }
+   
+   
    //----------------------------------------------------------------
 
@@ -114,5 +156,5 @@
    {
       StdOStringStream oss;
-      oss << "< " << CContext::GetName()
+      oss << "<" << CContext::GetName()
           << " id=\"" << this->getId() << "\" "
           << SuperClassAttribute::toString() << ">" << std::endl;
@@ -124,13 +166,13 @@
       {
 
-   #define DECLARE_NODE(Name_, name_)    \
-      if (CObjectFactory::HasObject<C##Name_##Definition>(C##Name_##Definition::GetDefName())) \
+#define DECLARE_NODE(Name_, name_)    \
+   if (CObjectFactory::HasObject<C##Name_##Definition>(C##Name_##Definition::GetDefName())) \
    oss << *CObjectFactory::GetObject<C##Name_##Definition>(C##Name_##Definition::GetDefName()) << std::endl;
-   #define DECLARE_NODE_PAR(Name_, name_)
-   #include "node_type.conf"
-
-      }
-
-      oss << "</ " << CContext::GetName() << " >";
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
+
+      }
+
+      oss << "</" << CContext::GetName() << " >";
 
       return (oss.str());
@@ -141,9 +183,9 @@
    void CContext::solveDescInheritance(const CAttributeMap * const UNUSED(parent))
    {
-   #define DECLARE_NODE(Name_, name_)    \
-      if (CObjectFactory::HasObject<C##Name_##Definition>(C##Name_##Definition::GetDefName())) \
+#define DECLARE_NODE(Name_, name_)    \
+   if (CObjectFactory::HasObject<C##Name_##Definition>(C##Name_##Definition::GetDefName())) \
    CObjectFactory::GetObject<C##Name_##Definition>(C##Name_##Definition::GetDefName())->solveDescInheritance();
-   #define DECLARE_NODE_PAR(Name_, name_)
-   #include "node_type.conf"
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
    }
 
@@ -152,11 +194,11 @@
    bool CContext::hasChild(void) const
    {
-      return (false ||
-   #define DECLARE_NODE(Name_, name_)    \
-      CObjectFactory::HasObject<C##Name_##Definition>  (C##Name_##Definition::GetDefName())   ||
-   #define DECLARE_NODE_PAR(Name_, name_)
-   #include "node_type.conf"
+      return (
+#define DECLARE_NODE(Name_, name_)    \
+   CObjectFactory::HasObject<C##Name_##Definition>  (C##Name_##Definition::GetDefName())   ||
+#define DECLARE_NODE_PAR(Name_, name_)
+#include "node_type.conf"
       false);
-   }
+}
 
    //----------------------------------------------------------------
Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/context.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/context.hpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/context.hpp	(revision 173)
@@ -20,5 +20,5 @@
    // Declare/Define CFileAttribute
    BEGIN_DECLARE_ATTRIBUTE_MAP(CContext)
-   #include "context_attribute.conf"
+#  include "context_attribute.conf"
    END_DECLARE_ATTRIBUTE_MAP(CContext)
 
@@ -73,4 +73,6 @@
 
          virtual StdString toString(void) const;
+         virtual void toBinary  (StdOStream & os) const;
+         virtual void fromBinary(StdIStream & is);
 
    }; // class CContext
Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.hpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.hpp	(revision 173)
@@ -22,5 +22,5 @@
    // Declare/Define CDomainAttribute
    BEGIN_DECLARE_ATTRIBUTE_MAP(CDomain)
-   #include "domain_attribute.conf"
+#  include "domain_attribute.conf"
    END_DECLARE_ATTRIBUTE_MAP(CDomain)
 
Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/field.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/field.hpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/field.hpp	(revision 173)
@@ -27,5 +27,5 @@
    // Declare/Define CFieldAttribute
    BEGIN_DECLARE_ATTRIBUTE_MAP(CField)
-   #include "field_attribute.conf"
+#  include "field_attribute.conf"
    END_DECLARE_ATTRIBUTE_MAP(CField)
 
Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/file.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/file.cpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/file.cpp	(revision 173)
@@ -138,5 +138,5 @@
       StdOStringStream oss;
 
-      oss << "< " << CFile::GetName() << " ";
+      oss << "<" << CFile::GetName() << " ";
       if (this->hasId())
          oss << " id=\"" << this->getId() << "\" ";
@@ -144,5 +144,5 @@
       if (this->getVirtualFieldGroup().get() != NULL)
          oss << *this->getVirtualFieldGroup() << std::endl;
-      oss << "</ " << CFile::GetName() << " >";
+      oss << "</" << CFile::GetName() << " >";
       return (oss.str());
    }
Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/file.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/file.hpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/file.hpp	(revision 173)
@@ -22,5 +22,5 @@
    // Declare/Define CFileAttribute
    BEGIN_DECLARE_ATTRIBUTE_MAP(CFile)
-   #include "file_attribute.conf"
+#  include "file_attribute.conf"
    END_DECLARE_ATTRIBUTE_MAP(CFile)
 
Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.hpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.hpp	(revision 173)
@@ -23,5 +23,5 @@
    // Declare/Define CGridAttribute
    BEGIN_DECLARE_ATTRIBUTE_MAP(CGrid)
-   #include "grid_attribute.conf"
+#  include "grid_attribute.conf"
    END_DECLARE_ATTRIBUTE_MAP(CGrid)
 
Index: XMLIO_V2/dev/dev_rv/src/xmlio/object_factory_impl.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/object_factory_impl.hpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/object_factory_impl.hpp	(revision 173)
@@ -85,5 +85,7 @@
       }
       else if (CObjectFactory::HasObject<U>(id))
+      {
          return (CObjectFactory::GetObject<U>(id));
+      }
       else
       {
Index: XMLIO_V2/dev/dev_rv/src/xmlio/object_template_impl.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/object_template_impl.hpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/object_template_impl.hpp	(revision 173)
@@ -56,5 +56,5 @@
    {
       StdOStringStream oss;
-      oss << "< " << T::GetName();
+      oss << "<" << T::GetName();
       if (this->hasId())
          oss << " id=\"" << this->getId() << "\"";
Index: XMLIO_V2/dev/dev_rv/src/xmlio/xml_parser.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/xml_parser.cpp	(revision 172)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/xml_parser.cpp	(revision 173)
@@ -53,17 +53,24 @@
 
                   if (attributes.end() == attributes.find("id"))
-                  {  DEBUG("Le context ne sera pas traitÃ© car il n'est pas identifiÃ© !");
-                     continue; }
+                  {  
+                     DEBUG("Le context ne sera pas traitÃ© car il n'est pas identifiÃ© !");
+                     continue; 
+                  }
 
                   CObjectFactory::SetCurrentContextId(attributes["id"]);
                   CGroupFactory::SetCurrentContextId(attributes["id"]);
 
-                  if(CObjectFactory::HasObject<tree::CContext>(attributes["id"]))
-                  {  DEBUG("Le context ne sera pas traitÃ© car il existe dÃ©jÃ  un autre context possÃ©dant le mÃªme nom !");
-                     continue; }
+                  bool hasctxt = CObjectFactory::HasObject<tree::CContext>(attributes["id"]);
+
+                  if(hasctxt)
+                  {  
+                     DEBUG("Le context ne sera pas traitÃ© car "
+                           << "il existe dÃ©jÃ  un autre context possÃ©dant le mÃªme nom !");
+                     continue; 
+                  }
 
                   boost::shared_ptr<tree::CContext> context =
                      CObjectFactory::CreateObject<tree::CContext>(attributes["id"]);
-                  CGroupFactory::AddChild(group_context, context);
+                  if (!hasctxt) CGroupFactory::AddChild(group_context, context);
                   context->parse(node);
 
