FoXy
FoXy


FoXy, Fortran XML parser for poor people
A KISS pure Fortran Library for parsing XML files
- FoXy is a pure Fortran (KISS) library for modern Fortran projects;
- FoXy is Fortran 2008+ standard compliant;
- FoXy is OOP designed;
- FoXy is a Free, Open Source Project.
Compiler Support

What is FoXy? | Aims | Status | Documentation | Copyrights
What is FoXy?
Modern Fortran standards (2003+) have introduced better support for strings manipulations. Exploiting such new Fortran capabilities, FoXy is aimed to provide an easy to use module library to parse and emit XML files and or tags.
Aims
Other programming languages have many libraries for XML parsing, Fortran has less options, but some there are:
- xml-fortran of Arjen Markus;
- xml-f90 of Alberto Garcia;
- fox of Andrew Walker that is an improved fork of xml-f90 of Alberto Garcia;
- tixi from DLR Simulation and Software Technology (C-binding).
All of the above are great codes, but lack in some points that we would like to have:
- actively maintained;
- designed for modern Fortran:
- OOP designed;
- exploiting new features of Fortran (e.g. deferred length allocatable characters);
- recreate a pure Fortran representation of the XML data (e.g. tree structure exploiting);
- parallel architectures supported (threads/processes safety ensured);
- extensively tested (strong unit-test regression);
- comprehensively documented;
- pure Fortran:
- no wrapper;
- no bindings, no
ISO_C_BINDING
;
- be FOSS.
In some sense or other, the afore-mentioned Fortran libraries miss somethings.
Go to Top
Status

Features
- [ ] Input:
- [ ] parse input file/string:
- [x] create linearized DOM (nested and repeated tags supported)
- [ ] lazy inquire tag into DOM;
- [x] Output:
- [x] write tag (atomically) on file/string;
- [x] Input/Output:
- [x] create tag structure:
- [x] start tag with name and attributes;
- [x] self closing tag;
- [x] nested tag;
- [x] tag content;
- [x] end tag;
- [x] tag DOM hierarchy (tag ID, parent ID, children IDs, level);
- [x] tag indent;
- [x] add tag to DOM;
- [x] delete tag from DOM;
Doing
- lazy inquire tag into DOM.
Todo
- profile the parser:
- almost surely there are performance penalties;
Go to Top
Documentation
Besides this README file the FoXy documentation is contained into its own wiki. Detailed documentation of the API is contained into the GitHub Pages that can also be created locally by means of ford tool.
Go to Top
Copyrights
FoXy is an open source project, it is distributed under a multi-licensing system:
Anyone is interest to use, to develop or to contribute to FoXy is welcome, feel free to select the license that best matches your soul!
Go to Top
Developer Info
Fortran-FOSS-Programmers Group