SAX2.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. /*
  2. * Summary: SAX2 parser interface used to build the DOM tree
  3. * Description: those are the default SAX2 interfaces used by
  4. * the library when building DOM tree.
  5. *
  6. * Copy: See Copyright for the status of this software.
  7. *
  8. * Author: Daniel Veillard
  9. */
  10. #ifndef __XML_SAX2_H__
  11. #define __XML_SAX2_H__
  12. #include <stdio.h>
  13. #include <stdlib.h>
  14. #include <libxml/xmlversion.h>
  15. #include <libxml/parser.h>
  16. #include <libxml/xlink.h>
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. XMLPUBFUN const xmlChar * XMLCALL
  21. xmlSAX2GetPublicId (void *ctx);
  22. XMLPUBFUN const xmlChar * XMLCALL
  23. xmlSAX2GetSystemId (void *ctx);
  24. XMLPUBFUN void XMLCALL
  25. xmlSAX2SetDocumentLocator (void *ctx,
  26. xmlSAXLocatorPtr loc);
  27. XMLPUBFUN int XMLCALL
  28. xmlSAX2GetLineNumber (void *ctx);
  29. XMLPUBFUN int XMLCALL
  30. xmlSAX2GetColumnNumber (void *ctx);
  31. XMLPUBFUN int XMLCALL
  32. xmlSAX2IsStandalone (void *ctx);
  33. XMLPUBFUN int XMLCALL
  34. xmlSAX2HasInternalSubset (void *ctx);
  35. XMLPUBFUN int XMLCALL
  36. xmlSAX2HasExternalSubset (void *ctx);
  37. XMLPUBFUN void XMLCALL
  38. xmlSAX2InternalSubset (void *ctx,
  39. const xmlChar *name,
  40. const xmlChar *ExternalID,
  41. const xmlChar *SystemID);
  42. XMLPUBFUN void XMLCALL
  43. xmlSAX2ExternalSubset (void *ctx,
  44. const xmlChar *name,
  45. const xmlChar *ExternalID,
  46. const xmlChar *SystemID);
  47. XMLPUBFUN xmlEntityPtr XMLCALL
  48. xmlSAX2GetEntity (void *ctx,
  49. const xmlChar *name);
  50. XMLPUBFUN xmlEntityPtr XMLCALL
  51. xmlSAX2GetParameterEntity (void *ctx,
  52. const xmlChar *name);
  53. XMLPUBFUN xmlParserInputPtr XMLCALL
  54. xmlSAX2ResolveEntity (void *ctx,
  55. const xmlChar *publicId,
  56. const xmlChar *systemId);
  57. XMLPUBFUN void XMLCALL
  58. xmlSAX2EntityDecl (void *ctx,
  59. const xmlChar *name,
  60. int type,
  61. const xmlChar *publicId,
  62. const xmlChar *systemId,
  63. xmlChar *content);
  64. XMLPUBFUN void XMLCALL
  65. xmlSAX2AttributeDecl (void *ctx,
  66. const xmlChar *elem,
  67. const xmlChar *fullname,
  68. int type,
  69. int def,
  70. const xmlChar *defaultValue,
  71. xmlEnumerationPtr tree);
  72. XMLPUBFUN void XMLCALL
  73. xmlSAX2ElementDecl (void *ctx,
  74. const xmlChar *name,
  75. int type,
  76. xmlElementContentPtr content);
  77. XMLPUBFUN void XMLCALL
  78. xmlSAX2NotationDecl (void *ctx,
  79. const xmlChar *name,
  80. const xmlChar *publicId,
  81. const xmlChar *systemId);
  82. XMLPUBFUN void XMLCALL
  83. xmlSAX2UnparsedEntityDecl (void *ctx,
  84. const xmlChar *name,
  85. const xmlChar *publicId,
  86. const xmlChar *systemId,
  87. const xmlChar *notationName);
  88. XMLPUBFUN void XMLCALL
  89. xmlSAX2StartDocument (void *ctx);
  90. XMLPUBFUN void XMLCALL
  91. xmlSAX2EndDocument (void *ctx);
  92. #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
  93. XMLPUBFUN void XMLCALL
  94. xmlSAX2StartElement (void *ctx,
  95. const xmlChar *fullname,
  96. const xmlChar **atts);
  97. XMLPUBFUN void XMLCALL
  98. xmlSAX2EndElement (void *ctx,
  99. const xmlChar *name);
  100. #endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED */
  101. XMLPUBFUN void XMLCALL
  102. xmlSAX2StartElementNs (void *ctx,
  103. const xmlChar *localname,
  104. const xmlChar *prefix,
  105. const xmlChar *URI,
  106. int nb_namespaces,
  107. const xmlChar **namespaces,
  108. int nb_attributes,
  109. int nb_defaulted,
  110. const xmlChar **attributes);
  111. XMLPUBFUN void XMLCALL
  112. xmlSAX2EndElementNs (void *ctx,
  113. const xmlChar *localname,
  114. const xmlChar *prefix,
  115. const xmlChar *URI);
  116. XMLPUBFUN void XMLCALL
  117. xmlSAX2Reference (void *ctx,
  118. const xmlChar *name);
  119. XMLPUBFUN void XMLCALL
  120. xmlSAX2Characters (void *ctx,
  121. const xmlChar *ch,
  122. int len);
  123. XMLPUBFUN void XMLCALL
  124. xmlSAX2IgnorableWhitespace (void *ctx,
  125. const xmlChar *ch,
  126. int len);
  127. XMLPUBFUN void XMLCALL
  128. xmlSAX2ProcessingInstruction (void *ctx,
  129. const xmlChar *target,
  130. const xmlChar *data);
  131. XMLPUBFUN void XMLCALL
  132. xmlSAX2Comment (void *ctx,
  133. const xmlChar *value);
  134. XMLPUBFUN void XMLCALL
  135. xmlSAX2CDataBlock (void *ctx,
  136. const xmlChar *value,
  137. int len);
  138. #ifdef LIBXML_SAX1_ENABLED
  139. XMLPUBFUN int XMLCALL
  140. xmlSAXDefaultVersion (int version);
  141. #endif /* LIBXML_SAX1_ENABLED */
  142. XMLPUBFUN int XMLCALL
  143. xmlSAXVersion (xmlSAXHandler *hdlr,
  144. int version);
  145. XMLPUBFUN void XMLCALL
  146. xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
  147. int warning);
  148. #ifdef LIBXML_HTML_ENABLED
  149. XMLPUBFUN void XMLCALL
  150. xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
  151. XMLPUBFUN void XMLCALL
  152. htmlDefaultSAXHandlerInit (void);
  153. #endif
  154. #ifdef LIBXML_DOCB_ENABLED
  155. XMLPUBFUN void XMLCALL
  156. xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
  157. XMLPUBFUN void XMLCALL
  158. docbDefaultSAXHandlerInit (void);
  159. #endif
  160. XMLPUBFUN void XMLCALL
  161. xmlDefaultSAXHandlerInit (void);
  162. #ifdef __cplusplus
  163. }
  164. #endif
  165. #endif /* __XML_SAX2_H__ */