SAX2.h 4.3 KB

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