Skip to main content

new_ns

Function new_ns 

Source
pub unsafe fn new_ns(
    node: *mut _xmlNode,
    href: *const xmlChar,
    prefix: *const xmlChar,
) -> *mut _xmlNs
Expand description

Create a new namespace declaration.

§UPSTREAM-PARITY

xmlNsPtr xmlNewNs(xmlNodePtr node, const xmlChar *href, const xmlChar *prefix);

Creates a new namespace declaration on the given node. The namespace is added to the node’s nsDef list.

If href is NULL, the namespace is a default namespace undeclaration. If prefix is NULL, this is the default namespace (xmlns=“…”).

§SAFETY

  • node must be a valid pointer to an _xmlNode, or NULL.
  • href must be a valid null-terminated string or NULL.
  • prefix must be a valid null-terminated string or NULL.