#[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,
) -> TxErrorExpand description
Sets an attribute on an element. Creates the attribute if it doesn’t exist, or updates its value if it does.
§Safety
docmust be a valid, non-null pointer to aTxDocument.nameandvaluemust be valid, non-null pointers to null-terminated UTF-8 strings.