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.

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

     asXMLNode(x, namespace="")

_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.

namespace: the XML namespace identifer for this node.

_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"))

