isXMLString               package:XML               R Documentation

_F_a_c_i_l_i_t_i_e_s _f_o_r _w_o_r_k_i_n_g _w_i_t_h _X_M_L _s_t_r_i_n_g_s

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

     These functions and classes are used to represent and parse a
     string whose content is known to be XML. 'xml' allows us to mark a
     character vector as containing XML, i.e. of class 'XMLString'.

     'xmlParseString' is a convenience routine for converting an XML
     string into an XML node/tree.

     'isXMLString' is examines a strings content and heuristically 
     determines whether it is XML.

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

     isXMLString(str)
     xmlParseString(content, doc = NULL, namespaces = RXMLNamespaces, clean = TRUE) 
     xml(x) 

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

str,x,content: the string containing the XML material.

     doc: 

namespaces: 

   clean: 

_A_u_t_h_o_r(_s):

     Dncan Temple Lang

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

     'xmlParse' 'xmlTreeParse'

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

      isXMLString("a regular string < 20 characters long")
      isXMLString("<a><b>c</b></a>")

      xmlParseString("<a><b>c</b></a>")

       # We can lie!
      isXMLString(xml("foo"))

