2012-09-14 12:11:43 +02:00
|
|
|
#ifndef ARABICA_PARSERCONFIG_H
|
|
|
|
#define ARABICA_PARSERCONFIG_H
|
|
|
|
|
2024-09-03 16:49:31 +02:00
|
|
|
#ifdef ARABICA_USE_LIBXML2
|
2012-09-14 12:11:43 +02:00
|
|
|
#include <SAX/wrappers/saxlibxml2.hpp>
|
|
|
|
#undef DEF_SAX_P
|
|
|
|
#define DEF_SAX_P libxml2_wrapper
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma message("Including libxml2")
|
|
|
|
#pragma comment(lib, "libxml2.lib")
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2024-09-02 22:58:45 +02:00
|
|
|
#ifdef USE_MSXML
|
2012-09-14 12:11:43 +02:00
|
|
|
#ifndef _MSC_VER
|
|
|
|
#error "Can only use MSXML on Windows"
|
|
|
|
#endif
|
|
|
|
#pragma message("Including MSXML")
|
|
|
|
#include <SAX/wrappers/saxmsxml2.hpp>
|
|
|
|
#undef DEF_SAX_P
|
|
|
|
#define DEF_SAX_P msxml2_wrapper
|
|
|
|
#endif
|
|
|
|
|
2024-09-08 22:12:15 +02:00
|
|
|
#ifdef ARABICA_USE_XERCES
|
2012-09-14 12:11:43 +02:00
|
|
|
#include <SAX/wrappers/saxxerces.hpp>
|
|
|
|
#undef DEF_SAX_P
|
|
|
|
#define DEF_SAX_P xerces_wrapper
|
2012-11-01 23:12:55 +01:00
|
|
|
#ifndef ARABICA_NOT_USE_PRAGMA_LINKER_OPTIONS
|
2012-09-14 12:11:43 +02:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma message("Including Xerces v3")
|
|
|
|
#ifdef _DEBUG
|
|
|
|
#pragma comment(lib, "xerces-c_3D.lib")
|
|
|
|
#else
|
|
|
|
#pragma comment(lib, "xerces-c_3.lib")
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
2012-11-01 23:12:55 +01:00
|
|
|
#endif
|
2012-09-14 12:11:43 +02:00
|
|
|
|
2024-09-02 22:58:45 +02:00
|
|
|
#ifdef USE_GARDEN
|
2012-09-14 12:11:43 +02:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma message("Including Garden")
|
|
|
|
#endif
|
|
|
|
#include <SAX/parsers/saxgarden.hpp>
|
|
|
|
#undef DEF_SAX_P
|
|
|
|
#define DEF_SAX_P Garden
|
|
|
|
#endif
|
|
|
|
|
2024-09-03 11:11:47 +02:00
|
|
|
#ifdef ARABICA_USE_EXPAT
|
2012-09-14 12:11:43 +02:00
|
|
|
#include <SAX/wrappers/saxexpat.hpp>
|
|
|
|
#undef DEF_SAX_P
|
|
|
|
#define DEF_SAX_P expat_wrapper
|
|
|
|
#ifdef _MSC_VER
|
2012-11-01 23:12:55 +01:00
|
|
|
#ifndef ARABICA_NOT_USE_PRAGMA_LINKER_OPTIONS
|
2012-09-14 12:11:43 +02:00
|
|
|
#pragma message("Including Expat")
|
|
|
|
#ifndef XML_STATIC
|
|
|
|
#pragma comment(lib, "libexpat.lib")
|
|
|
|
#else
|
|
|
|
#pragma comment(lib, "libexpatMT.lib")
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
2012-11-01 23:12:55 +01:00
|
|
|
#endif
|
2012-09-14 12:11:43 +02:00
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
2012-11-01 23:12:55 +01:00
|
|
|
#ifndef ARABICA_NOT_USE_PRAGMA_LINKER_OPTIONS
|
2012-09-14 12:11:43 +02:00
|
|
|
#pragma comment(lib, "wsock32.lib")
|
|
|
|
#endif
|
2012-11-01 23:12:55 +01:00
|
|
|
#endif
|
2012-09-14 12:11:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef NO_DEFAULT_PARSER
|
|
|
|
#ifdef DEF_SAX_P
|
|
|
|
namespace Arabica
|
|
|
|
{
|
|
|
|
namespace SAX
|
|
|
|
{
|
|
|
|
template<class string_type, class T0 = Arabica::nil_t, class T1 = Arabica::nil_t>
|
|
|
|
class XMLReader : public DEF_SAX_P<string_type, T0, T1> { };
|
|
|
|
} // namespace SAX
|
|
|
|
} // namespace Arabica
|
|
|
|
#else
|
|
|
|
#error "No default parser defined."
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#undef DEF_P
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|