Skip to main content

new_doc

Function new_doc 

Source
pub unsafe fn new_doc(version: *const xmlChar) -> *mut _xmlDoc
Expand description

Create a new XML document.

§UPSTREAM-PARITY

xmlDocPtr xmlNewDoc(const xmlChar *version);

Creates a new document with the given version string (or “1.0” if NULL). The document is initialized with:

  • type = XML_DOCUMENT_NODE
  • standalone = -1 (unknown)
  • doc->doc = self (self-reference)
  • properties = XML_DOC_WELLFORMED

§SAFETY

  • version must be a valid null-terminated string or NULL.