xmlSize                 package:XML                 R Documentation

_T_h_e _n_u_m_b_e_r _o_f _s_u_b-_e_l_e_m_e_n_t_s _w_i_t_h_i_n _a_n _X_M_L _n_o_d_e.

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

     XML elements can contain other, nested sub-elements. This generic
     function determines the number of such elements within a specified
     node. It applies to an object of class XMLNode or XMLDocument.

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

     xmlSize(obj)

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

     obj: An an object of class XMLNode or XMLDocument.

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

     an integer which is the 'length' of the value from 'xmlChildren'.

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

     'xmlChildren', 'xmlAttrs', 'xmlName', 'xmlTreeParse'

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

       fileName <- system.file("exampleData", "mtcars.xml", package="XML") 
       doc <- xmlTreeParse(fileName)
       xmlSize(doc)
       xmlSize(doc$doc$children[["dataset"]][["variables"]])

