Hash :
01791d57
Author :
Date :
1998-07-24T19:24:09
Added the XML code developped at W3C, Daniel.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
/*
* parser.h : constants and stuff related to the XML parser.
*
* See Copyright for the status of this software.
*
* $Id$
*/
#ifndef __XML_PARSER_H__
#define __XML_PARSER_H__
#include "xml_tree.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Constants.
*/
#define XML_DEFAULT_VERSION "1.0"
typedef struct xmlParserCtxt {
const char *filename; /* The file analyzed, if any */
const CHAR *base; /* Base of the array to parse */
const CHAR *cur; /* Current char being parsed */
int line; /* Current line */
int col; /* Current column */
xmlDocPtr doc; /* the document being built */
int depth; /* Depth of current element */
int max_depth; /* Max depth allocated */
xmlNodePtr *nodes; /* The node hierarchy being built */
} xmlParserCtxt, *xmlParserCtxtPtr;
/*
* Interfaces
*/
extern int xmlParseDocument(xmlParserCtxtPtr ctxt);
extern xmlDocPtr xmlParseDoc(CHAR *cur);
extern xmlDocPtr xmlParseMemory(char *buffer, int size);
extern xmlDocPtr xmlParseFile(const char *filename);
extern CHAR *xmlStrdup(const CHAR *input);
extern CHAR *xmlStrndup(const CHAR *input, int n);
extern CHAR *xmlStrchr(const CHAR *str, CHAR val);
extern int xmlStrcmp(const CHAR *str1, const CHAR *str2);
extern int xmlStrncmp(const CHAR *str1, const CHAR *str2, int len);
extern void xmlInitParserCtxt(xmlParserCtxtPtr ctx);
extern void xmlClearParserCtxt(xmlParserCtxtPtr ctx);
extern void xmlSetupParserForBuffer(xmlParserCtxtPtr ctx, const CHAR* buffer,
const char* filename);
extern void xmlReportError(xmlParserCtxtPtr ctx, const CHAR* msg);
#ifdef __cplusplus
}
#endif
#endif /* __XML_PARSER_H__ */