Skip to main content

new_child

Function new_child 

Source
pub unsafe fn new_child(
    parent: *mut _xmlNode,
    ns: *mut _xmlNs,
    name: *const xmlChar,
) -> *mut _xmlNode
Expand description

Create a new child element.

§UPSTREAM-PARITY

xmlNodePtr xmlNewChild(xmlNodePtr parent, xmlNsPtr ns, const xmlChar *name);

Creates a new element and adds it as the last child of parent.

§SAFETY

  • parent must be a valid pointer to an _xmlNode, or NULL.
  • name must be a valid null-terminated string or NULL.