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