docName                 package:XML                 R Documentation

_A_c_c_e_s_s_o_r_s _f_o_r _n_a_m_e _o_f _X_M_L _d_o_c_u_m_e_n_t

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

     These functions and methods allow us to query and set the  name
     of an XML document. This is intended to be its URL or file name or
     a description of its origin if raw XML content provided as a
     string.

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

     docName(doc)

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

     doc: the XML document object, of class 'XMLInternalDocument' or
          'XMLDocument'. 

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

     A character string giving the name. If the document was created
     from text, this is 'NA' (of class character).

     The assignment function returns the updated object, but the R
     assignment operation will return the value on the right of the
     assignment!

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

     Duncan Temple Lang

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

     'xmlTreeParse' 'xmlInternalTreeParse' 'newXMLDoc'

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

       f = system.file("exampleData", "catalog.xml",  package = "XML")
       doc = xmlInternalTreeParse(f)
       docName(doc)

       doc = xmlInternalTreeParse("<a><b/></a>", asText = TRUE)
           # an NA
       docName(doc)
       docName(doc) = "Simple XML example"
       docName(doc)

