SAX2.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. XMLPUBFUN const xmlChar * XMLCALL
  20. xmlSAX2GetPublicId (void *ctx);
  21. XMLPUBFUN const xmlChar * XMLCALL
  22. xmlSAX2GetSystemId (void *ctx);
  23. XMLPUBFUN void XMLCALL
  24. xmlSAX2SetDocumentLocator (void *ctx,
  25. xmlSAXLocatorPtr loc);
  26. XMLPUBFUN int XMLCALL
  27. xmlSAX2GetLineNumber (void *ctx);
  28. XMLPUBFUN int XMLCALL
  29. xmlSAX2GetColumnNumber (void *ctx);
  30. XMLPUBFUN int XMLCALL
  31. xmlSAX2IsStandalone (void *ctx);
  32. XMLPUBFUN int XMLCALL
  33. xmlSAX2HasInternalSubset (void *ctx);
  34. XMLPUBFUN int XMLCALL
  35. xmlSAX2HasExternalSubset (void *ctx);
  36. XMLPUBFUN void XMLCALL
  37. xmlSAX2InternalSubset (void *ctx,
  38. const xmlChar *name,
  39. const xmlChar *ExternalID,
  40. const xmlChar *SystemID);
  41. XMLPUBFUN void XMLCALL
  42. xmlSAX2ExternalSubset (void *ctx,
  43. const xmlChar *name,
  44. const xmlChar *ExternalID,
  45. const xmlChar *SystemID);
  46. XMLPUBFUN xmlEntityPtr XMLCALL
  47. xmlSAX2GetEntity (void *ctx,
  48. const xmlChar *name);
  49. XMLPUBFUN xmlEntityPtr XMLCALL
  50. xmlSAX2GetParameterEntity (void *ctx,
  51. const xmlChar *name);
  52. XMLPUBFUN xmlParserInputPtr XMLCALL
  53. xmlSAX2ResolveEntity (void *ctx,
  54. const xmlChar *publicId,
  55. const xmlChar *systemId);
  56. XMLPUBFUN void XMLCALL
  57. xmlSAX2EntityDecl (void *ctx,
  58. const xmlChar *name,
  59. int type,
  60. const xmlChar *publicId,
  61. const xmlChar *systemId,
  62. xmlChar *content);
  63. XMLPUBFUN void XMLCALL
  64. xmlSAX2AttributeDecl (void *ctx,
  65. const xmlChar *elem,
  66. const xmlChar *fullname,
  67. int type,
  68. int def,
  69. const xmlChar *defaultValue,
  70. xmlEnumerationPtr tree);
  71. XMLPUBFUN void XMLCALL
  72. xmlSAX2ElementDecl (void *ctx,
  73. const xmlChar *name,
  74. int type,
  75. xmlElementContentPtr content);
  76. XMLPUBFUN void XMLCALL
  77. xmlSAX2NotationDecl (void *ctx,
  78. const xmlChar *name,
  79. const xmlChar *publicId,
  80. const xmlChar *systemId);
  81. XMLPUBFUN void XMLCALL
  82. xmlSAX2UnparsedEntityDecl (void *ctx,
  83. const xmlChar *name,
  84. const xmlChar *publicId,
  85. const xmlChar *systemId,
  86. const xmlChar *notationName);
  87. XMLPUBFUN void XMLCALL
  88. xmlSAX2StartDocument (void *ctx);
  89. XMLPUBFUN void XMLCALL
  90. xmlSAX2EndDocument (void *ctx);
  91. #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
  92. defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_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 or LIBXML_LEGACY_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. XML_DEPRECATED
  152. XMLPUBFUN void XMLCALL
  153. htmlDefaultSAXHandlerInit (void);
  154. #endif
  155. XML_DEPRECATED
  156. XMLPUBFUN void XMLCALL
  157. xmlDefaultSAXHandlerInit (void);
  158. #ifdef __cplusplus
  159. }
  160. #endif
  161. #endif /* __XML_SAX2_H__ */