xml parse library in checkers

Hello all,

I am writing a new checker using StaticAnalyzer core. I was wondering if there is some library (e.g. expat) to parse xml documents included in the project that I could use from a checker.
If there is, how do I include it to my checker? If not, is it correct to add expat lib to clang project?

Thanks!

Clang optionally depends on libxml2 now.

Dmitri

I don’t really know how to include it. Could you please explain me briefly how to do that in order to use it from a checker?

Do I have to download the libxml2 project under llvm/tools? modify configurations file?

Thanks!!

I don't really know how to include it. Could you please explain me briefly
how to do that in order to use it from a checker?

tools/c-index-test/c-index-test.c does this:

#include <libxml/parser.h>

Do I have to download the libxml2 project under llvm/tools? modify
configurations file?

You need to install it before invoking cmake for LLVM. If libxml2 is
properly installed on the system, LLVM will detect it automatically.

Dmitri