Why an XML library in Fortran

Fortran and XML do not mix well. However, the vast majority of computational scientific codes in use, and under development, today, are written in Fortran, for a variety of reasons - and it would be nice if the output from these codes was available marked up in XML for better data management.

Equally, XML provides an increasingly common serialization format for exchange of data common to a domain. Fortran codes need to be able to produce and access information in XML formats.

There are a number of potential approaches to integrating Fortran codes into an XML-centric data world, including cross-language linking against existing XML libraries written in C; or having a separate post-processing stage which marks up unchanged text data from existing codes. However, FoX adopts the approach of writing the entire library in fully standard-compliant Fortran 95. This enables seamless use of FoX in any existing code, with no issues of cross-language compilation, or maintenance of separate processing stages.

FoX is in use by several leading scientific simulation codes including: