supportsExpat              package:XML              R Documentation

_D_e_t_e_r_m_i_n_e_s _w_h_i_c_h _n_a_t_i_v_e _X_M_L _p_a_r_s_e_r_s _a_r_e _b_e_i_n_g _u_s_e_d.

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

     Use of the Gnome libxml and Expat parsers is supported in this R/S
     XML package, but both need not be used when compiling the package.
     These functions determine whether each is available in the
     underlying native code.

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

     supportsExpat()
     supportsLibxml()

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

     One might to use different parsers to test  validity of a document
     in different ways and to get different error messages.
     Additionally, one parser may be more efficient than the other.
     These methods allow one to write code in such a way that one
     parser is preferred and is used if it is available, but the other
     is used if the first is not available.

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

     Returns 'TRUE' if the corresponding library has been linked into
     the package.

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

     'xmlEventParse'

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

          # use Expat if possible, otherwise libxml
       fileName <- system.file("exampleData", "mtcars.xml", package="XML")
       xmlEventParse(fileName, useExpat = supportsLibxml())

