Skip to main content

tx_node_value

Function tx_node_value 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn tx_node_value( doc: *mut TxDocument, node: TxNodeId, ) -> *const c_char
Expand description

Returns the “value” of a node based on its type:

  • Element → tag name
  • Text → text content
  • Comment → comment text
  • Declaration → declaration name
  • Unknown → raw content
  • Document → empty string

§Safety

doc must be a valid, non-null pointer to a TxDocument.