pub unsafe fn validate_element(
ctxt: *mut _xmlValidCtxt,
doc: *mut _xmlDoc,
elem: *mut _xmlNode,
) -> c_intExpand description
Validate a single element node against its DTD element and attribute declarations.
§UPSTREAM-PARITY
int xmlValidateElement(xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);Validates:
- Element declaration exists for the element name
- Content model matches child elements
- Required attributes are present
- Attribute values match their declared types
- ID uniqueness
- IDREF references resolve
Returns 1 if valid, 0 otherwise.
§SAFETY
ctxt,doc,elemmay be NULL.