newXMLDoc                package:XML                R Documentation

_C_r_e_a_t_e _i_n_t_e_r_n_a_l _X_M_L _n_o_d_e _o_r _d_o_c_u_m_e_n_t _o_b_j_e_c_t

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

     These are used to create internal `libxml' nodes and top-level
     document objects  that are used to write XML trees. While the
     functions are available, their direct use is not encouraged.
     Instead, use `xmlTree' as the functions need to be  used within a
     strict regime to avoid corrupting C level structures.

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

     newXMLDoc(dtd, namespaces=NULL)
     newXMLNode(name, ..., attrs = NULL, namespace="", doc=NULL)

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

     dtd: the name of the DTD to use for the XML document.

namespaces: a named character vector with each element specifying a
          name space identifier and the corresponding URI for that
          namespace that are to be declared and used in the XML
          document, \ e.g. `c(shelp =
          "http://www.omegahat.org/XML/SHelp")'

    name: the tag/element name for the XML node

     ...: the children of this node. These can be other nodes created
          earlier or R strings that are converted to text nodes and
          added as children to this newly created node.

   attrs: a named list of name-value pairs to be used as  attributes
          for the XML node.

namespace: the short or alias for the namespace to use for this XML
          node

     doc: the `XMLInternalDocument' object created with `newXMLDoc'
          that is used to root the node.

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

     These create internal C level objects/structure instances that can
     be added to a libxml DOM and subsequently inserted into other
     document objects or ``serialized'' to textual form.

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

     Each function returns an R object that points to the C-level
     structure instance. These are of class `XMLInternalDocument' and
     `XMLInternalNode', respectively

_N_o_t_e:

     These functions are used to build up an internal XML tree. This
     can be used in the Sxslt package (<URL:
     http://www.omegahat.org/Sxslt>) when creating content in R that is
     to be dynamicall inserted into an XML document.

_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.xmlsoft.org>, <URL:
     http://www.omegahat.org>

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

     `xmlTree' `saveXML'

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

