[<-.XMLNode               package:XML               R Documentation

_A_s_s_i_g_n _s_u_b-_n_o_d_e_s _t_o _a_n _X_M_L _n_o_d_e

_D_e_s_c_r_i_p_t_i_o_n:

     These functions allow one to assign a sub-node to an existing XML
     node by name or index. These are the assignment equivalents of the
      subsetting accessor functions. They are typically called
     indirectly via the assignment operator, such as  'x[["myTag"]] <-
     xmlNode("mySubTag")'.

_U_s_a_g_e:

     x[i] <- value
     "[<-.XMLNode"(x, i, value)
     "[[<-.XMLNode"(x, i, value)

_A_r_g_u_m_e_n_t_s:

       x: the 'XMLNode' object to which the sub-node is to be assigned.

       i: the identifier for the position  in the list of children of
          'x' into which the right-hand-side node(s) should be
          assigned. These can be either numbers or names.

   value: one or more 'XMLNode' objects which are to be the sub-nodes
          of 'x'.

_V_a_l_u_e:

     The XML node 'x' containing the new or modified nodes.

_A_u_t_h_o_r(_s):

     Duncan Templle Lang

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.w3.org>, <URL: http://www.omegahat.org/RSXML>

_S_e_e _A_l_s_o:

     '[.XMLNode' '[[.XMLNode' 'append.xmlNode' 'xmlSize'

_E_x_a_m_p_l_e_s:

      top <- xmlNode("top", xmlNode("next","Some text"))
      top[["second"]] <- xmlCDataNode("x <- 1:10")
      top[[3]] <- xmlNode("tag",attrs=c(id="name"))

