Index: XIOS/trunk/src/interface/c/icxml_tree.cpp
===================================================================
--- XIOS/trunk/src/interface/c/icxml_tree.cpp	(revision 817)
+++ XIOS/trunk/src/interface/c/icxml_tree.cpp	(revision 835)
@@ -310,4 +310,35 @@
    }
 
+   void cxios_xml_tree_add_axistogrid
+      (XGridPtr parent_, XAxisPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->addAxis(child_id_str);
+      }
+      else
+      {
+         *child_ = parent_->addAxis();
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
+
+   void cxios_xml_tree_add_domaintogrid
+      (XGridPtr parent_, XDomainPtr * child_, const char * child_id, int child_id_size)
+   {
+      std::string child_id_str;
+      CTimer::get("XIOS").resume() ;
+      if (cstr2string(child_id, child_id_size, child_id_str))
+      {
+         *child_ = parent_->addDomain(child_id_str);
+      }
+      else
+      {
+         *child_ = parent_->addDomain();
+      }
+      CTimer::get("XIOS").suspend() ;
+   }
 
    // ----------------------- Affichage de l'arborescence ----------------------
Index: XIOS/trunk/src/interface/fortran/ixios_interfaces.F90
===================================================================
--- XIOS/trunk/src/interface/fortran/ixios_interfaces.F90	(revision 817)
+++ XIOS/trunk/src/interface/fortran/ixios_interfaces.F90	(revision 835)
@@ -83,5 +83,5 @@
                       xios(add_axisgroup), xios(add_filegroup), xios(add_gridgroup), xios(add_fieldgroup), &
                       xios(add_domaingroup), xios(add_fieldgrouptofile), xios(add_variablegrouptofile),    &
-                      xios(add_variablegrouptofield)
+                      xios(add_variablegrouptofield), xios(add_axistogrid), xios(add_domaintogrid)
 
 PRIVATE
@@ -135,5 +135,6 @@
                    xios(add_fieldtofile), xios(add_variabletofile), xios(add_variabletofield), xios(add_axisgroup),  &
                    xios(add_filegroup), xios(add_gridgroup), xios(add_fieldgroup), xios(add_domaingroup),            &
-                   xios(add_fieldgrouptofile), xios(add_variablegrouptofile),xios(add_variablegrouptofield)
+                   xios(add_fieldgrouptofile), xios(add_variablegrouptofile),xios(add_variablegrouptofield),         &
+                   xios(add_axistogrid), xios(add_domaintogrid)
 END INTERFACE xios(add_child)
 
Index: XIOS/trunk/src/interface/fortran/ixml_tree.F90
===================================================================
--- XIOS/trunk/src/interface/fortran/ixml_tree.F90	(revision 817)
+++ XIOS/trunk/src/interface/fortran/ixml_tree.F90	(revision 835)
@@ -9,7 +9,7 @@
    USE IDOMAIN
    USE IVARIABLE
-     
+
    INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
-     
+
       SUBROUTINE cxios_xml_tree_add_field(parent_, child_, child_id, child_id_size) BIND(C)
          USE ISO_C_BINDING
@@ -19,5 +19,5 @@
          INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
       END SUBROUTINE cxios_xml_tree_add_field
-      
+
       SUBROUTINE cxios_xml_tree_add_grid(parent_, child_, child_id, child_id_size) BIND(C)
          USE ISO_C_BINDING
@@ -27,5 +27,5 @@
          INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
       END SUBROUTINE cxios_xml_tree_add_grid
-      
+
       SUBROUTINE cxios_xml_tree_add_file(parent_, child_, child_id, child_id_size) BIND(C)
          USE ISO_C_BINDING
@@ -35,5 +35,5 @@
          INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
       END SUBROUTINE cxios_xml_tree_add_file
-      
+
       SUBROUTINE cxios_xml_tree_add_axis(parent_, child_, child_id, child_id_size) BIND(C)
          USE ISO_C_BINDING
@@ -43,5 +43,5 @@
          INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
       END SUBROUTINE cxios_xml_tree_add_axis
-      
+
       SUBROUTINE cxios_xml_tree_add_domain(parent_, child_, child_id, child_id_size) BIND(C)
          USE ISO_C_BINDING
@@ -51,5 +51,5 @@
          INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
       END SUBROUTINE cxios_xml_tree_add_domain
-      
+
       SUBROUTINE cxios_xml_tree_add_fieldtofile(parent_, child_, child_id, child_id_size) BIND(C)
          USE ISO_C_BINDING
@@ -117,5 +117,5 @@
          INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
       END SUBROUTINE cxios_xml_tree_add_domaingroup
-      
+
       SUBROUTINE cxios_xml_tree_add_fieldgrouptofile(parent_, child_, child_id, child_id_size) BIND(C)
          USE ISO_C_BINDING
@@ -124,5 +124,5 @@
          CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
          INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
-      END SUBROUTINE cxios_xml_tree_add_fieldgrouptofile    
+      END SUBROUTINE cxios_xml_tree_add_fieldgrouptofile
 
       SUBROUTINE cxios_xml_tree_add_variablegrouptofile(parent_, child_, child_id, child_id_size) BIND(C)
@@ -132,5 +132,5 @@
          CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
          INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
-      END SUBROUTINE cxios_xml_tree_add_variablegrouptofile    
+      END SUBROUTINE cxios_xml_tree_add_variablegrouptofile
 
       SUBROUTINE cxios_xml_tree_add_variablegrouptofield(parent_, child_, child_id, child_id_size) BIND(C)
@@ -140,5 +140,21 @@
          CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
          INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
-      END SUBROUTINE cxios_xml_tree_add_variablegrouptofield    
+      END SUBROUTINE cxios_xml_tree_add_variablegrouptofield
+
+      SUBROUTINE cxios_xml_tree_add_axistogrid(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_axistogrid
+
+      SUBROUTINE cxios_xml_tree_add_domaintogrid(parent_, child_, child_id, child_id_size) BIND(C)
+         USE ISO_C_BINDING
+         INTEGER  (kind = C_INTPTR_T), VALUE        :: parent_
+         INTEGER  (kind = C_INTPTR_T)               :: child_
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: child_id
+         INTEGER  (kind = C_INT)     , VALUE        :: child_id_size
+      END SUBROUTINE cxios_xml_tree_add_domaintogrid
 
       SUBROUTINE cxios_xml_tree_show(filename, filename_size) BIND(C)
@@ -159,8 +175,8 @@
          INTEGER  (kind = C_INT) , VALUE        :: xmlcontent_size
       END SUBROUTINE cxios_xml_parse_string
-     
+
    END INTERFACE
 
-   
+
    CONTAINS ! Fonctions disponibles pour les utilisateurs.
 
@@ -178,5 +194,5 @@
 
    END SUBROUTINE xios(add_axis)
-   
+
    SUBROUTINE xios(add_file)(parent_hdl, child_hdl, child_id)
       TYPE(txios(filegroup))      , INTENT(IN) :: parent_hdl
@@ -191,5 +207,5 @@
 
    END SUBROUTINE xios(add_file)
-   
+
    SUBROUTINE xios(add_grid)(parent_hdl, child_hdl, child_id)
       TYPE(txios(gridgroup))     , INTENT(IN) :: parent_hdl
@@ -203,6 +219,6 @@
 
    END SUBROUTINE xios(add_grid)
-   
-   
+
+
    SUBROUTINE xios(add_field)(parent_hdl, child_hdl, child_id)
       TYPE(txios(fieldgroup))     , INTENT(IN) :: parent_hdl
@@ -217,6 +233,6 @@
 
    END SUBROUTINE xios(add_field)
-   
-   
+
+
    SUBROUTINE xios(add_domain)(parent_hdl, child_hdl, child_id)
       TYPE(txios(domaingroup))     , INTENT(IN) :: parent_hdl
@@ -231,5 +247,5 @@
 
    END SUBROUTINE xios(add_domain)
-   
+
    SUBROUTINE xios(add_fieldtofile)(parent_hdl, child_hdl, child_id)
       TYPE(txios(file))            , INTENT(IN) :: parent_hdl
@@ -309,5 +325,5 @@
          CALL cxios_xml_tree_add_gridgroup(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
       END IF
-      
+
    END SUBROUTINE xios(add_gridgroup)
 
@@ -374,5 +390,30 @@
       END IF
 
-   END SUBROUTINE xios(add_variablegrouptofield)  
-         
+   END SUBROUTINE xios(add_variablegrouptofield)
+
+   SUBROUTINE xios(add_axistogrid)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(grid))             , INTENT(IN) :: parent_hdl
+      TYPE(txios(axis))             , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL  , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_axistogrid(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_axistogrid(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_axistogrid)
+
+   SUBROUTINE xios(add_domaintogrid)(parent_hdl, child_hdl, child_id)
+      TYPE(txios(grid))             , INTENT(IN) :: parent_hdl
+      TYPE(txios(domain))           , INTENT(OUT):: child_hdl
+      CHARACTER(len = *), OPTIONAL  , INTENT(IN) :: child_id
+
+      IF (PRESENT(child_id)) THEN
+         CALL cxios_xml_tree_add_domaintogrid(parent_hdl%daddr, child_hdl%daddr, child_id, len(child_id))
+      ELSE
+         CALL cxios_xml_tree_add_domaintogrid(parent_hdl%daddr, child_hdl%daddr, "NONE", -1)
+      END IF
+
+   END SUBROUTINE xios(add_domaintogrid)
 END MODULE IXML_TREE
