mcpp index

compat.expat

#include

Expat — stream-oriented XML parser, built from the upstream release

#include <expat.h>
mcpp add compat.expat@2.7.1

用法

来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。

// 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 · 项目 tests/examples/expat

构建

targets
expat (lib)
language
c++23
C standard
c11
import std
no
include dirs
lib

源文件 (3)

  • lib/xmlparse.c
  • lib/xmltok.c
  • lib/xmlrole.c

生成的文件

  • lib/expat_config.h

版本

版本平台 镜像sha256
2.7.1 最新 Linux GLOBAL CN 354552544b8f…