]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/esi/ExpatParser.h
2 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 #ifndef SQUID_ESIEXPATPARSER_H
10 #define SQUID_ESIEXPATPARSER_H
12 #if USE_SQUID_ESI && HAVE_LIBEXPAT
14 #include "esi/Parser.h"
20 class ESIExpatParser
: public ESIParser
24 ESIExpatParser(ESIParserClient
*);
27 /** \retval true on success */
28 bool parse(char const *dataToParse
, size_t const lengthOfData
, bool const endOfStream
);
30 long int lineNumber() const;
31 char const * errorString() const;
38 static void Start(void *data
, const XML_Char
*el
, const char **attr
);
39 static void End(void *data
, const XML_Char
*el
);
40 static void Default (void *data
, const XML_Char
*s
, int len
);
41 static void Comment (void *data
, const XML_Char
*s
);
42 XML_Parser
&myParser() const {return p
;}
44 ESIParserClient
*theClient
;
47 #endif /* USE_SQUID_ESI */
49 #endif /* SQUID_ESIEXPATPARSER_H */