Descent XML provides a tokenizer and helper functions for writing an XML parser.
This repo (as well as libadt) use Nix files to provide
quick dependency management and a simple-to-use build environment.
- Install the Nix package manager: https://nixos.org/download/
- Use
nix-buildto compile the project for production- The compiled results will be placed in
result
- The compiled results will be placed in
- Use
nix-shellto enter a shell with build dependencies installed- This environment will have
libadt,cmake,gcc,gdbanddoxygenavailable, and set upCFLAGSwith many useful debugging flags
- This environment will have
From there, you can use the build steps described in the Configuration and Documentation sections below.
Building uses CMake, providing a couple of custom flags for tests and examples in the documentation:
mkdir build
cd build
# Add other cmake command options to taste, e.g.
# -DBUILD_TESTING=True -DBUILD_EXAMPLES=True
cmake ..
make installLink with -ldescent-xml -ladt. For static linking, use -ldescent-xmlstatic.
Tutorials and reference documentation can be found at https://themadman.github.io/descent-xml/. Documentation can be built using doxygen, which will generate a html/index.html that can be opened.
- Currently, Descent XML just uses the application's encoding. It doesn't support reading the encoding provided in the XML and parsing it, separately from the application's
CTYPElocale setting. This should be fixed inlex.h. - There isn't an easy interface to parse partial XML, for example from a partially-filled buffer.
- Only simple
!DOCTYPEs are supported. The!DOCTYPEname is not validated against the root node. - The library works by passing around pointers into the original script, meaning:
- entities are passed as-is, without being processed; and
- text nodes with embedded
![CDATA[]]sections will call the text callback separately.
- Processing Instructions are not implemented.
- Schema validation is not implemented.
- Probably more issues, idk. I'm sick of looking at this stupid standard.