asXMLNode                package:XML                R Documentation

_C_o_n_v_e_r_t_s _n_o_n-_X_M_L _n_o_d_e _o_b_j_e_c_t_s _t_o _X_M_L_T_e_x_t_N_o_d_e _o_b_j_e_c_t_s

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

     This function is used to convert S objects that are not already
     'XMLNode' objects into objects of that class. Specifically, it
     treats  the object as a string and creates an 'XMLTextNode'
     object.

     Also, there is a method for converting an XMLInternalNode - the
     C-level libxml representation of a node - to  an explicit R-only
     object which contains the R values of the data in the internal
     node.

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

     asXMLNode(x)

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

       x: the object to be converted to an 'XMLNode' object. This is
          typically alread an object that inherits from 'XMLNode' or a
          string.

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

_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>, <URL: http://www.jclark.com/xml>,
     <URL: http://www.omegahat.org>

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

     'xmlNode' 'xmlTextNode'

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

        # creates an XMLTextNode.
      asXMLNode("a text node")

        # unaltered.
      asXMLNode(xmlNode("p"))

