Skip to main content

add_child

Function add_child 

Source
pub unsafe fn add_child(
    parent: *mut _xmlNode,
    cur: *mut _xmlNode,
) -> *mut _xmlNode
Expand description

Add a child node to a parent.

§UPSTREAM-PARITY

xmlNodePtr xmlAddChild(xmlNodePtr parent, xmlNodePtr cur);

Adds cur as the last child of parent. Returns the child, or NULL on failure.

§SAFETY

  • parent must be a valid pointer to an _xmlNode.
  • cur must be a valid pointer to an _xmlNode.