compat.expat
#includeExpat — stream-oriented XML parser, built from the upstream release
#include <expat.h>
mcpp add compat.expat@2.7.1
Usage
From this repository's own test project — built and run by CI, not written for the website.
// compat.expat — behavioral test. It parses a document rather than checking
// that symbols resolve, because the interesting failures are configuration
// ones: XML_DTD, XML_GE and XML_NS are feature switches compiled into
// expat_config.h, and getting them wrong yields a parser that links perfectly
// and then rejects (or mis-splits) input.
#ifdef __linux__
#include <expat.h>
#include <dlfcn.h>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
namespace {
int failures = 0;
void check(bool ok, const char *what)
{
// …
tests/examples/expat/tests/xml.cpp · project tests/examples/expat
Build
- targets
expat (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
lib
Sources (3)
lib/xmlparse.clib/xmltok.clib/xmlrole.c
Generated files
lib/expat_config.h