You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
671 B

4 years ago
  1. from lxml.includes cimport tree
  2. from lxml.includes.tree cimport xmlDoc, xmlDtd
  3. cdef extern from "libxml/valid.h" nogil:
  4. ctypedef void (*xmlValidityErrorFunc)(void * ctx, const char * msg, ...)
  5. ctypedef void (*xmlValidityWarningFunc)(void * ctx, const char * msg, ...)
  6. ctypedef struct xmlValidCtxt:
  7. void *userData
  8. xmlValidityErrorFunc error
  9. xmlValidityWarningFunc warning
  10. cdef xmlValidCtxt* xmlNewValidCtxt()
  11. cdef void xmlFreeValidCtxt(xmlValidCtxt* cur)
  12. cdef int xmlValidateDtd(xmlValidCtxt* ctxt, xmlDoc* doc, xmlDtd* dtd)
  13. cdef tree.xmlElement* xmlGetDtdElementDesc(
  14. xmlDtd* dtd, tree.const_xmlChar* name)