xmlNamespaceDefinitions         package:XML         R Documentation

_G_e_t _d_e_f_i_n_i_t_i_o_n_s _o_f _a_n_y _n_a_m_e_s_p_a_c_e_s _d_e_f_i_n_e_d _i_n _t_h_i_s _X_M_L _n_o_d_e

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

     If the given node has any namespace definitions declared within
     it, i.e. of the form 'xmlns:myNamespace="http://www.myNS.org"',
     this function provides access to these definitions. While they
     appear in the XML node in the document as attributes, they are
     treated differently by the parser and so do not show up in the
     nodes attributes via 'xmlAttrs'.

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

     xmlNamespaceDefinitions(x, addNames = TRUE)

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

       x: the 'XMLNode' object in which to find any namespace
          definitions

addNames: a logical indicating whether to compute the names for the
          elements in the resulting list. The names are convenient, but
          one can avoid the (very small) overhead of computing these
          with this parameter.

_D_e_t_a_i_l_s:

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

     A list with as many elements as there are namespace definitions.
     Each element is an object of class XMLNameSpace, containing fields
     giving the local identifier, the associated defining URI and a
     logical value indicating whether the definition is local to this
     node.

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

     'xmlTreeParse' 'xmlAttrs' 'xmlGetAttr'

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

       f = system.file("exampleData", "longitudinalData.xml", package = "XML")
       n = xmlRoot(xmlTreeParse(f))
       xmlNamespaceDefinitions(n)

