xmlparse.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  1. /*
  2. Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
  3. See the file copying.txt for copying permission.
  4. */
  5. #ifndef XMLPARSE_H_INCLUDED
  6. #define XMLPARSE_H_INCLUDED
  7. #include "xmlrpc-c/c_util.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. typedef void *XML_Parser;
  12. #ifdef XML_UNICODE_WCHAR_T
  13. /* XML_UNICODE_WCHAR_T will work only if sizeof(wchar_t) == 2 and wchar_t
  14. uses Unicode.
  15. */
  16. /* Information is UTF-16 encoded as wchar_ts */
  17. #ifndef XML_UNICODE
  18. #define XML_UNICODE
  19. #endif
  20. #include <stddef.h>
  21. typedef wchar_t XML_Char;
  22. typedef wchar_t XML_LChar;
  23. #else /* not XML_UNICODE_WCHAR_T */
  24. #ifdef XML_UNICODE
  25. /* Information is UTF-16 encoded as unsigned shorts */
  26. typedef unsigned short XML_Char;
  27. typedef char XML_LChar;
  28. #else /* not XML_UNICODE */
  29. /* Information is UTF-8 encoded. */
  30. typedef char XML_Char;
  31. typedef char XML_LChar;
  32. #endif /* not XML_UNICODE */
  33. #endif /* not XML_UNICODE_WCHAR_T */
  34. /* Constructs a new parser; encoding is the encoding specified by the external
  35. protocol or null if there is none specified. */
  36. XML_Parser XMLRPC_DLLEXPORT
  37. xmlrpc_XML_ParserCreate(const XML_Char * const encoding);
  38. /* Constructs a new parser and namespace processor. Element type names
  39. and attribute names that belong to a namespace will be expanded;
  40. unprefixed attribute names are never expanded; unprefixed element type
  41. names are expanded only if there is a default namespace. The expanded
  42. name is the concatenation of the namespace URI, the namespace separator character,
  43. and the local part of the name. If the namespace separator is '\0' then
  44. the namespace URI and the local part will be concatenated without any
  45. separator. When a namespace is not declared, the name and prefix will be
  46. passed through without expansion. */
  47. XML_Parser XMLRPC_DLLEXPORT
  48. xmlrpc_XML_ParserCreateNS(const XML_Char * const encoding,
  49. XML_Char const namespaceSeparator);
  50. /* atts is array of name/value pairs, terminated by 0;
  51. names and values are 0 terminated. */
  52. typedef void (*XML_StartElementHandler)(void *userData,
  53. const XML_Char *name,
  54. const XML_Char **atts);
  55. typedef void (*XML_EndElementHandler)(void *userData,
  56. const XML_Char *name);
  57. /* s is not 0 terminated. */
  58. typedef void (*XML_CharacterDataHandler)(void *userData,
  59. const XML_Char *s,
  60. int len);
  61. /* target and data are 0 terminated */
  62. typedef void (*XML_ProcessingInstructionHandler)(void *userData,
  63. const XML_Char *target,
  64. const XML_Char *data);
  65. /* data is 0 terminated */
  66. typedef void (*XML_CommentHandler)(void *userData, const XML_Char *data);
  67. typedef void (*XML_StartCdataSectionHandler)(void *userData);
  68. typedef void (*XML_EndCdataSectionHandler)(void *userData);
  69. /* This is called for any characters in the XML document for
  70. which there is no applicable handler. This includes both
  71. characters that are part of markup which is of a kind that is
  72. not reported (comments, markup declarations), or characters
  73. that are part of a construct which could be reported but
  74. for which no handler has been supplied. The characters are passed
  75. exactly as they were in the XML document except that
  76. they will be encoded in UTF-8. Line boundaries are not normalized.
  77. Note that a byte order mark character is not passed to the default handler.
  78. There are no guarantees about how characters are divided between calls
  79. to the default handler: for example, a comment might be split between
  80. multiple calls. */
  81. typedef void (*XML_DefaultHandler)(void *userData,
  82. const XML_Char *s,
  83. int len);
  84. /* This is called for the start of the DOCTYPE declaration when the
  85. name of the DOCTYPE is encountered. */
  86. typedef void (*XML_StartDoctypeDeclHandler)(void *userData,
  87. const XML_Char *doctypeName);
  88. /* This is called for the start of the DOCTYPE declaration when the
  89. closing > is encountered, but after processing any external subset. */
  90. typedef void (*XML_EndDoctypeDeclHandler)(void *userData);
  91. /* This is called for a declaration of an unparsed (NDATA)
  92. entity. The base argument is whatever was set by XML_SetBase.
  93. The entityName, systemId and notationName arguments will never be null.
  94. The other arguments may be. */
  95. typedef void (*XML_UnparsedEntityDeclHandler)(void *userData,
  96. const XML_Char *entityName,
  97. const XML_Char *base,
  98. const XML_Char *systemId,
  99. const XML_Char *publicId,
  100. const XML_Char *notationName);
  101. /* This is called for a declaration of notation.
  102. The base argument is whatever was set by XML_SetBase.
  103. The notationName will never be null. The other arguments can be. */
  104. typedef void (*XML_NotationDeclHandler)(void *userData,
  105. const XML_Char *notationName,
  106. const XML_Char *base,
  107. const XML_Char *systemId,
  108. const XML_Char *publicId);
  109. typedef void (*XML_ExternalParsedEntityDeclHandler)(void *userData,
  110. const XML_Char *entityName,
  111. const XML_Char *base,
  112. const XML_Char *systemId,
  113. const XML_Char *publicId);
  114. typedef void (*XML_InternalParsedEntityDeclHandler)(void *userData,
  115. const XML_Char *entityName,
  116. const XML_Char *replacementText,
  117. int replacementTextLength);
  118. /* When namespace processing is enabled, these are called once for
  119. each namespace declaration. The call to the start and end element
  120. handlers occur between the calls to the start and end namespace
  121. declaration handlers. For an xmlns attribute, prefix will be null.
  122. For an xmlns="" attribute, uri will be null. */
  123. typedef void (*XML_StartNamespaceDeclHandler)(void *userData,
  124. const XML_Char *prefix,
  125. const XML_Char *uri);
  126. typedef void (*XML_EndNamespaceDeclHandler)(void *userData,
  127. const XML_Char *prefix);
  128. /* This is called if the document is not standalone (it has an
  129. external subset or a reference to a parameter entity, but does not
  130. have standalone="yes"). If this handler returns 0, then processing
  131. will not continue, and the parser will return a
  132. XML_ERROR_NOT_STANDALONE error. */
  133. typedef int (*XML_NotStandaloneHandler)(void *userData);
  134. /* This is called for a reference to an external parsed general entity.
  135. The referenced entity is not automatically parsed.
  136. The application can parse it immediately or later using
  137. XML_ExternalEntityParserCreate.
  138. The parser argument is the parser parsing the entity containing the reference;
  139. it can be passed as the parser argument to XML_ExternalEntityParserCreate.
  140. The systemId argument is the system identifier as specified in the entity declaration;
  141. it will not be null.
  142. The base argument is the system identifier that should be used as the base for
  143. resolving systemId if systemId was relative; this is set by XML_SetBase;
  144. it may be null.
  145. The publicId argument is the public identifier as specified in the entity declaration,
  146. or null if none was specified; the whitespace in the public identifier
  147. will have been normalized as required by the XML spec.
  148. The context argument specifies the parsing context in the format
  149. expected by the context argument to
  150. XML_ExternalEntityParserCreate; context is valid only until the handler
  151. returns, so if the referenced entity is to be parsed later, it must be copied.
  152. The handler should return 0 if processing should not continue because of
  153. a fatal error in the handling of the external entity.
  154. In this case the calling parser will return an XML_ERROR_EXTERNAL_ENTITY_HANDLING
  155. error.
  156. Note that unlike other handlers the first argument is the parser, not userData. */
  157. typedef int (*XML_ExternalEntityRefHandler)(XML_Parser parser,
  158. const XML_Char *context,
  159. const XML_Char *base,
  160. const XML_Char *systemId,
  161. const XML_Char *publicId);
  162. /* This structure is filled in by the XML_UnknownEncodingHandler
  163. to provide information to the parser about encodings that are unknown
  164. to the parser.
  165. The map[b] member gives information about byte sequences
  166. whose first byte is b.
  167. If map[b] is c where c is >= 0, then b by itself encodes the Unicode scalar value c.
  168. If map[b] is -1, then the byte sequence is malformed.
  169. If map[b] is -n, where n >= 2, then b is the first byte of an n-byte
  170. sequence that encodes a single Unicode scalar value.
  171. The data member will be passed as the first argument to the convert function.
  172. The convert function is used to convert multibyte sequences;
  173. s will point to a n-byte sequence where map[(unsigned char)*s] == -n.
  174. The convert function must return the Unicode scalar value
  175. represented by this byte sequence or -1 if the byte sequence is malformed.
  176. The convert function may be null if the encoding is a single-byte encoding,
  177. that is if map[b] >= -1 for all bytes b.
  178. When the parser is finished with the encoding, then if release is not null,
  179. it will call release passing it the data member;
  180. once release has been called, the convert function will not be called again.
  181. Expat places certain restrictions on the encodings that are supported
  182. using this mechanism.
  183. 1. Every ASCII character that can appear in a well-formed XML document,
  184. other than the characters
  185. $@\^`{}~
  186. must be represented by a single byte, and that byte must be the
  187. same byte that represents that character in ASCII.
  188. 2. No character may require more than 4 bytes to encode.
  189. 3. All characters encoded must have Unicode scalar values <= 0xFFFF,
  190. (ie characters that would be encoded by surrogates in UTF-16
  191. are not allowed). Note that this restriction doesn't apply to
  192. the built-in support for UTF-8 and UTF-16.
  193. 4. No Unicode character may be encoded by more than one distinct sequence
  194. of bytes. */
  195. typedef struct {
  196. int map[256];
  197. void *data;
  198. int (*convert)(void *data, const char *s);
  199. void (*release)(void *data);
  200. } XML_Encoding;
  201. /* This is called for an encoding that is unknown to the parser.
  202. The encodingHandlerData argument is that which was passed as the
  203. second argument to XML_SetUnknownEncodingHandler.
  204. The name argument gives the name of the encoding as specified in
  205. the encoding declaration.
  206. If the callback can provide information about the encoding,
  207. it must fill in the XML_Encoding structure, and return 1.
  208. Otherwise it must return 0.
  209. If info does not describe a suitable encoding,
  210. then the parser will return an XML_UNKNOWN_ENCODING error. */
  211. typedef int (*XML_UnknownEncodingHandler)(void *encodingHandlerData,
  212. const XML_Char *name,
  213. XML_Encoding *info);
  214. void XMLRPC_DLLEXPORT
  215. xmlrpc_XML_SetElementHandler(XML_Parser parser,
  216. XML_StartElementHandler start,
  217. XML_EndElementHandler end);
  218. void XMLRPC_DLLEXPORT
  219. xmlrpc_XML_SetCharacterDataHandler(XML_Parser parser,
  220. XML_CharacterDataHandler handler);
  221. void XMLRPC_DLLEXPORT
  222. xmlrpc_XML_SetProcessingInstructionHandler(
  223. XML_Parser parser,
  224. XML_ProcessingInstructionHandler handler);
  225. void XMLRPC_DLLEXPORT
  226. xmlrpc_XML_SetCommentHandler(XML_Parser parser,
  227. XML_CommentHandler handler);
  228. void XMLRPC_DLLEXPORT
  229. xmlrpc_XML_SetCdataSectionHandler(XML_Parser parser,
  230. XML_StartCdataSectionHandler start,
  231. XML_EndCdataSectionHandler end);
  232. /* This sets the default handler and also inhibits expansion of
  233. internal entities. The entity reference will be passed to the default
  234. handler.
  235. */
  236. void XMLRPC_DLLEXPORT
  237. xmlrpc_XML_SetDefaultHandler(XML_Parser parser,
  238. XML_DefaultHandler handler);
  239. /* This sets the default handler but does not inhibit expansion of internal entities.
  240. The entity reference will not be passed to the default handler. */
  241. void XMLRPC_DLLEXPORT
  242. xmlrpc_XML_SetDefaultHandlerExpand(XML_Parser parser,
  243. XML_DefaultHandler handler);
  244. void XMLRPC_DLLEXPORT
  245. xmlrpc_XML_SetDoctypeDeclHandler(XML_Parser parser,
  246. XML_StartDoctypeDeclHandler start,
  247. XML_EndDoctypeDeclHandler end);
  248. void XMLRPC_DLLEXPORT
  249. xmlrpc_XML_SetUnparsedEntityDeclHandler(XML_Parser parser,
  250. XML_UnparsedEntityDeclHandler handler);
  251. void XMLRPC_DLLEXPORT
  252. xmlrpc_XML_SetNotationDeclHandler(XML_Parser parser,
  253. XML_NotationDeclHandler handler);
  254. void XMLRPC_DLLEXPORT
  255. xmlrpc_XML_SetExternalParsedEntityDeclHandler(
  256. XML_Parser parser,
  257. XML_ExternalParsedEntityDeclHandler handler);
  258. void XMLRPC_DLLEXPORT
  259. xmlrpc_XML_SetInternalParsedEntityDeclHandler(
  260. XML_Parser parser,
  261. XML_InternalParsedEntityDeclHandler handler);
  262. void XMLRPC_DLLEXPORT
  263. xmlrpc_XML_SetNamespaceDeclHandler(XML_Parser parser,
  264. XML_StartNamespaceDeclHandler start,
  265. XML_EndNamespaceDeclHandler end);
  266. void XMLRPC_DLLEXPORT
  267. xmlrpc_XML_SetNotStandaloneHandler(XML_Parser parser,
  268. XML_NotStandaloneHandler handler);
  269. void XMLRPC_DLLEXPORT
  270. xmlrpc_XML_SetExternalEntityRefHandler(XML_Parser parser,
  271. XML_ExternalEntityRefHandler handler);
  272. /* If a non-null value for arg is specified here, then it will be
  273. passed as the first argument to the external entity ref handler
  274. instead of the parser object.
  275. */
  276. void XMLRPC_DLLEXPORT
  277. xmlrpc_XML_SetExternalEntityRefHandlerArg(XML_Parser, void *arg);
  278. void XMLRPC_DLLEXPORT
  279. xmlrpc_XML_SetUnknownEncodingHandler(XML_Parser parser,
  280. XML_UnknownEncodingHandler handler,
  281. void *encodingHandlerData);
  282. /* This can be called within a handler for a start element, end element,
  283. processing instruction or character data. It causes the corresponding
  284. markup to be passed to the default handler.
  285. */
  286. void XMLRPC_DLLEXPORT
  287. xmlrpc_XML_DefaultCurrent(XML_Parser parser);
  288. /* This value is passed as the userData argument to callbacks. */
  289. void XMLRPC_DLLEXPORT
  290. xmlrpc_XML_SetUserData(XML_Parser parser, void *userData);
  291. /* Returns the last value set by XML_SetUserData or null. */
  292. #define XML_GetUserData(parser) (*(void **)(parser))
  293. /* This is equivalent to supplying an encoding argument
  294. to XML_ParserCreate. It must not be called after XML_Parse
  295. or XML_ParseBuffer. */
  296. int XMLRPC_DLLEXPORT
  297. xmlrpc_XML_SetEncoding(XML_Parser parser, const XML_Char *encoding);
  298. /* If this function is called, then the parser will be passed
  299. as the first argument to callbacks instead of userData.
  300. The userData will still be accessible using XML_GetUserData.
  301. */
  302. void XMLRPC_DLLEXPORT
  303. xmlrpc_XML_UseParserAsHandlerArg(XML_Parser parser);
  304. /* Sets the base to be used for resolving relative URIs in system
  305. identifiers in declarations. Resolving relative identifiers is left
  306. to the application: this value will be passed through as the base
  307. argument to the XML_ExternalEntityRefHandler, XML_NotationDeclHandler
  308. and XML_UnparsedEntityDeclHandler. The base argument will be copied.
  309. Returns zero if out of memory, non-zero otherwise.
  310. */
  311. int XMLRPC_DLLEXPORT
  312. xmlrpc_XML_SetBase(XML_Parser parser, const XML_Char *base);
  313. const XML_Char XMLRPC_DLLEXPORT *
  314. xmlrpc_XML_GetBase(XML_Parser parser);
  315. /* Returns the number of the attribute/value pairs passed in last call
  316. to the XML_StartElementHandler that were specified in the start-tag
  317. rather than defaulted. Each attribute/value pair counts as 2; thus
  318. this correspondds to an index into the atts array passed to the
  319. XML_StartElementHandler.
  320. */
  321. int XMLRPC_DLLEXPORT
  322. xmlrpc_XML_GetSpecifiedAttributeCount(XML_Parser parser);
  323. /* Returns the index of the ID attribute passed in the last call to
  324. XML_StartElementHandler, or -1 if there is no ID attribute. Each
  325. attribute/value pair counts as 2; thus this correspondds to an index
  326. into the atts array passed to the XML_StartElementHandler.
  327. */
  328. int XMLRPC_DLLEXPORT
  329. xmlrpc_XML_GetIdAttributeIndex(XML_Parser parser);
  330. /* Parses some input. Returns 0 if a fatal error is detected.
  331. The last call to XML_Parse must have isFinal true;
  332. len may be zero for this call (or any other).
  333. */
  334. int XMLRPC_DLLEXPORT
  335. xmlrpc_XML_Parse(XML_Parser const xmlParserP,
  336. const char * const s,
  337. size_t const len,
  338. int const isFinal);
  339. void XMLRPC_DLLEXPORT *
  340. xmlrpc_XML_GetBuffer(XML_Parser const xmlParserP,
  341. size_t const len);
  342. int XMLRPC_DLLEXPORT
  343. xmlrpc_XML_ParseBuffer(XML_Parser const parser, int const len, int const isFinal);
  344. /* Creates an XML_Parser object that can parse an external general
  345. entity; context is a '\0'-terminated string specifying the parse
  346. context; encoding is a '\0'-terminated string giving the name of the
  347. externally specified encoding, or null if there is no externally
  348. specified encoding. The context string consists of a sequence of
  349. tokens separated by formfeeds (\f); a token consisting of a name
  350. specifies that the general entity of the name is open; a token of the
  351. form prefix=uri specifies the namespace for a particular prefix; a
  352. token of the form =uri specifies the default namespace. This can be
  353. called at any point after the first call to an
  354. ExternalEntityRefHandler so longer as the parser has not yet been
  355. freed. The new parser is completely independent and may safely be
  356. used in a separate thread. The handlers and userData are initialized
  357. from the parser argument. Returns 0 if out of memory. Otherwise
  358. returns a new XML_Parser object.
  359. */
  360. XML_Parser XMLRPC_DLLEXPORT
  361. xmlrpc_XML_ExternalEntityParserCreate(XML_Parser parser,
  362. const XML_Char *context,
  363. const XML_Char *encoding);
  364. enum XML_ParamEntityParsing {
  365. XML_PARAM_ENTITY_PARSING_NEVER,
  366. XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE,
  367. XML_PARAM_ENTITY_PARSING_ALWAYS
  368. };
  369. /* Controls parsing of parameter entities (including the external DTD
  370. subset). If parsing of parameter entities is enabled, then references
  371. to external parameter entities (including the external DTD subset)
  372. will be passed to the handler set with
  373. XML_SetExternalEntityRefHandler. The context passed will be 0.
  374. Unlike external general entities, external parameter entities can only
  375. be parsed synchronously. If the external parameter entity is to be
  376. parsed, it must be parsed during the call to the external entity ref
  377. handler: the complete sequence of XML_ExternalEntityParserCreate,
  378. XML_Parse/XML_ParseBuffer and XML_ParserFree calls must be made during
  379. this call. After XML_ExternalEntityParserCreate has been called to
  380. create the parser for the external parameter entity (context must be 0
  381. for this call), it is illegal to make any calls on the old parser
  382. until XML_ParserFree has been called on the newly created parser. If
  383. the library has been compiled without support for parameter entity
  384. parsing (ie without XML_DTD being defined), then
  385. XML_SetParamEntityParsing will return 0 if parsing of parameter
  386. entities is requested; otherwise it will return non-zero.
  387. */
  388. int XMLRPC_DLLEXPORT
  389. xmlrpc_XML_SetParamEntityParsing(XML_Parser parser,
  390. enum XML_ParamEntityParsing parsing);
  391. enum XML_Error {
  392. XML_ERROR_NONE,
  393. XML_ERROR_NO_MEMORY,
  394. XML_ERROR_SYNTAX,
  395. XML_ERROR_NO_ELEMENTS,
  396. XML_ERROR_INVALID_TOKEN,
  397. XML_ERROR_UNCLOSED_TOKEN,
  398. XML_ERROR_PARTIAL_CHAR,
  399. XML_ERROR_TAG_MISMATCH,
  400. XML_ERROR_DUPLICATE_ATTRIBUTE,
  401. XML_ERROR_JUNK_AFTER_DOC_ELEMENT,
  402. XML_ERROR_PARAM_ENTITY_REF,
  403. XML_ERROR_UNDEFINED_ENTITY,
  404. XML_ERROR_RECURSIVE_ENTITY_REF,
  405. XML_ERROR_ASYNC_ENTITY,
  406. XML_ERROR_BAD_CHAR_REF,
  407. XML_ERROR_BINARY_ENTITY_REF,
  408. XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF,
  409. XML_ERROR_MISPLACED_XML_PI,
  410. XML_ERROR_UNKNOWN_ENCODING,
  411. XML_ERROR_INCORRECT_ENCODING,
  412. XML_ERROR_UNCLOSED_CDATA_SECTION,
  413. XML_ERROR_EXTERNAL_ENTITY_HANDLING,
  414. XML_ERROR_NOT_STANDALONE
  415. };
  416. /* If xmlrpc_XML_Parse or xmlrpc_XML_ParseBuffer have returned 0, then
  417. xmlrpc_XML_GetErrorString and xmlrpc_XML_GetErrorCode return
  418. information about the error.
  419. */
  420. enum XML_Error XMLRPC_DLLEXPORT
  421. xmlrpc_XML_GetErrorCode(XML_Parser const parser);
  422. XMLRPC_DLLEXPORT const char *
  423. xmlrpc_XML_GetErrorString(XML_Parser const parser);
  424. /* These functions return information about the current parse location.
  425. They may be called when XML_Parse or XML_ParseBuffer return 0;
  426. in this case the location is the location of the character at which
  427. the error was detected.
  428. They may also be called from any other callback called to report
  429. some parse event; in this the location is the location of the first
  430. of the sequence of characters that generated the event.
  431. */
  432. int XMLRPC_DLLEXPORT
  433. xmlrpc_XML_GetCurrentLineNumber(XML_Parser parser);
  434. int XMLRPC_DLLEXPORT
  435. xmlrpc_XML_GetCurrentColumnNumber(XML_Parser parser);
  436. long XMLRPC_DLLEXPORT
  437. xmlrpc_XML_GetCurrentByteIndex(XML_Parser parser);
  438. /* Return the number of bytes in the current event.
  439. Returns 0 if the event is in an internal entity. */
  440. int XMLRPC_DLLEXPORT
  441. xmlrpc_XML_GetCurrentByteCount(XML_Parser parser);
  442. /* For backwards compatibility with previous versions. */
  443. #define XML_GetErrorLineNumber XML_GetCurrentLineNumber
  444. #define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber
  445. #define XML_GetErrorByteIndex XML_GetCurrentByteIndex
  446. /* Frees memory used by the parser. */
  447. void XMLRPC_DLLEXPORT
  448. xmlrpc_XML_ParserFree(XML_Parser parser);
  449. /* Returns a string describing the error. */
  450. const XML_LChar XMLRPC_DLLEXPORT *
  451. xmlrpc_XML_ErrorString(int const code);
  452. #ifdef __cplusplus
  453. }
  454. #endif
  455. #endif