Skip to main content

tx_element_set_attribute

Function tx_element_set_attribute 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn tx_element_set_attribute( doc: *mut TxDocument, el: TxNodeId, name: *const c_char, value: *const c_char, ) -> TxError
Expand description

Sets an attribute on an element. Creates the attribute if it doesn’t exist, or updates its value if it does.

§Safety

  • doc must be a valid, non-null pointer to a TxDocument.
  • name and value must be valid, non-null pointers to null-terminated UTF-8 strings.