Pure Fortran
No C bindings, no wrappers. Pure Fortran 2008+ with object-oriented design.
A KISS pure Fortran library for parsing and emitting XML files and tags.
Parse an XML string and query a tag's content:
use foxy, only: xml_file
type(xml_file) :: xfile
character(len=:), allocatable :: val
call xfile%parse(string= &
'<config>'//new_line('A')// &
' <dt unit="s">0.01</dt>'//new_line('A')// &
' <nstep>1000</nstep>'//new_line('A')// &
'</config>')
val = xfile%content('dt')
print *, val ! 0.01Create and emit a tag programmatically:
use foxy, only: xml_tag
type(xml_tag) :: tag
tag = xml_tag(name='point', &
attributes=reshape([['x','1'],['y','2'],['z','3']], [2,3]))
print *, tag%stringify() ! <point x="1" y="2" z="3"/>Contributions are welcome โ see the Contributing page.
FoXy is distributed under a multi-licensing system:
| Use case | License |
|---|---|
| FOSS projects | GPL v3 |
| Closed source / commercial | BSD 2-Clause |
| Closed source / commercial | BSD 3-Clause |
| Closed source / commercial | MIT |
Anyone interested in using, developing, or contributing to FoXy is welcome โ pick the license that best fits your needs.