Skip to main content

xmlSetProp

Function xmlSetProp 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn xmlSetProp( node: *mut _xmlNode, name: *const xmlChar, value: *const xmlChar, ) -> *mut _xmlAttr
Expand description

Set a property (attribute) on a node.

§UPSTREAM-PARITY

xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value);

If the attribute already exists, its value is updated. Returns a borrowed pointer to the attribute.

§SAFETY

  • node must be a valid element node.
  • name must be a valid string.
  • value may be NULL.