asXMLTreeNode              package:XML              R Documentation

_C_o_n_v_e_r_t _a _r_e_g_u_l_a_r _X_M_L _n_o_d_e _t_o _o_n_e _f_o_r _u_s_e _i_n _a "_f_l_a_t" _t_r_e_e

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

     This coerces a regular R-based XML node (i.e. not an internal
     C-level node) to a form that can be inserted into a flat tree,
     i.e. one that stores the nodes in a non-hierarchical manner. It is
     thus used in conjunction with 'xmlHashTree' and 'xmlFlatListTree'.
     It adds 'id' and 'env' fields to the node and specializes the
     class by prefixing 'className' to the class attribute.

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

     asXMLTreeNode(node, env, id = get(".nodeIdGenerator", env)(xmlName(node)), className = "XMLTreeNode")

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

    node: the original XML node

     env: the 'XMLFlatTree' object into which this node will be
          inserted.

      id: the identifier for the node in the flat tree. If this is not
          specified, we consult the tree itself and its built-in
          identifier generator.  By default, the name of the node is
          used as its identifier unless there is another node with that
          name. 

className: a vector of class names to be prefixed to the existing class
          vector of the node.

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

     An object of class 'className', i.e. by default '"XMLTreeNode"'.

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

     Duncan Temple Lang

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

     <URL: http://www.w3.org/XML>

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

     'xmlHashTree' 'xmlFlatListTree'

