axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
axl_bool axl_dtd_validate ( axlDoc doc,
axlDtd dtd,
axlError **  error 

Allows to validate the given XML document (axlDoc) against the given document type definition (DTD, axlDtd).

This function allows to validate your XML documents providing the document type definition, that was read using axl_dtd_parse or axl_dtd_parse_from_file.

Keep in mind that a document could be well-formed and valid. The only difference is that valid XML document are those that, meet all XML rules, but also are clasified and recognized as XML documents with some particular structure, that is represented (or constrained) with providing a DTD definition.

docThe axlDoc containing the XML document to be validated.
dtdThe axlDtd containing the DTD definition used to validate the document.
errorAn optional reference to a axlError object where validation errors are reported.
axl_true if the document is valid, axl_false if not.

References axl_doc_get_root(), axl_dtd_get_element(), axl_dtd_get_element_name(), axl_dtd_get_element_type(), axl_dtd_get_root(), axl_error_new(), axl_false, axl_free(), axl_hash_equal_string(), axl_hash_free(), axl_hash_new(), axl_hash_string(), AXL_LEVEL_CRITICAL, AXL_LEVEL_DEBUG, axl_list_always_return_1(), axl_list_free(), axl_list_new(), axl_node_get_child_num(), axl_node_get_name(), axl_node_have_childs(), axl_node_is_empty(), axl_return_val_if_fail, axl_stack_free(), axl_stack_is_empty(), axl_stack_new(), axl_stack_pop(), axl_stack_size(), axl_strdup_printf, axl_true, ELEMENT_TYPE_ANY, ELEMENT_TYPE_CHILDREN, ELEMENT_TYPE_EMPTY, ELEMENT_TYPE_MIXED, ELEMENT_TYPE_PCDATA, and NODE_CMP_NAME.