Skip to main content

add_id

Function add_id 

Source
pub unsafe fn add_id(
    ctxt: *mut _xmlValidCtxt,
    doc: *mut _xmlDoc,
    value: *const xmlChar,
    attr: *mut _xmlAttr,
) -> *mut _xmlID
Expand description

Upstream xmlAddID(ctxt, doc, value, attr) — returns the xmlID or NULL. Reports “ID %s already defined” through the validation context on duplicates and a memory error on OOM.

§SAFETY

  • ctxt may be NULL; doc/attr must be valid pointers (attr->doc == doc).