Skip to content

About FoXy ​

FoXy (Fortran XML for poor people) is a pure Fortran library to read, edit and write XML. Five types cover every use:

TypeFor
xml_filea whole document in memory (a DOM): parse a string or a file, query it, edit it, save it
xml_indexa file too large to hold: its tags and attributes, the contents read on demand
xml_handlera document of any size read once, in order: your callbacks are called for each tag and text, nothing is stored
xml_writera document of any size, written element by element to a file, a unit or memory
xml_taga single element: build it, parse it, write it

Which one you need depends on what you do with the document:

The library targets scientific codes: case files, results metadata (VTK, XDMF), catalogues (QuakeML). It is standard Fortran 2008, with no C bindings; it depends on small libraries by the same author (PENF for the kinds, StringiFor for strings, BeFoR64 and FACE), which every build system fetches.

This documentation reads in order, and each page links to the next one:

  1. Installation: get FoXy into your project.
  2. The tutorial: nine short chapters that build the input and output of a solver, step by step.
  3. The cookbook: short recipes, one for each "how do I ...?".
  4. The reference, from the feature map on: every method, every argument.

The API documents the source itself. Every code sample of the tutorial, of the cookbook and of the reference is part of a program that is compiled and run to produce the outputs shown (see docs/examples).

Authors ​

Contributions are welcome — see the Contributing page.

Copyrights ​

FoXy is distributed under a multi-licensing system:

Next: Installation.