cansas1d binding Fortran: Difference between revisions
No edit summary |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
The development of the FORTRAN language, so beloved of scientists, pre-dates the development of XML. And it shows. FORTRAN is not a language that manipulates strings with ease, and this makes parsing XML | The development of the FORTRAN language, so beloved of scientists, pre-dates the development of XML. And it shows. FORTRAN is not a language that manipulates strings with ease, and this makes parsing XML decidedly awkward. So unless you ''really'' have to use FORTRAN, you are probably better off with C/C++ (or something else more 'modern'), see for example Daniel Veillard's LIBXML2 library at http://xmlsoft.org/ or Frank van den Berghen's parser at http://www.applied-mathematics.net/tools/xmlParser.html. | ||
If you have to use a dialect earlier than FORTRAN-90 (F90), then the chances are you will have to code your own parser. | If you have to use a dialect earlier than FORTRAN-90 (F90), then the chances are you will have to code your own parser. | ||
== Software Development Kits == | |||
For later dialects, there are some SDK's available on the Web: | For later dialects, there are some SDK's available on the Web: | ||
* F90: | |||
XMLPARSE - by Arjen Markus at http://xml-fortran.sourceforge.net/ | ** XMLPARSE - by Arjen Markus at http://xml-fortran.sourceforge.net/ | ||
** FoX - by Toby White & others at http://uszla.me.uk/space/software/FoX/ | |||
* For F95: | |||
** XML - by Mart Rentmeester at http://nn-online.org/code/xml/ | |||
== canSAS 1-D SAS XML v1.0 support == | |||
Steve King[mailto:s.m.king@rl.ac.uk] (ISIS) has provided a F77 routine ([http://svn.smallangles.net/trac/canSAS/browser/1dwg/trunk/fortran/SASXML_G77.F SASXML_G77.F]) that will read CanSAS XML v1.0 files. | |||
Latest revision as of 08:03, 3 June 2008
The development of the FORTRAN language, so beloved of scientists, pre-dates the development of XML. And it shows. FORTRAN is not a language that manipulates strings with ease, and this makes parsing XML decidedly awkward. So unless you really have to use FORTRAN, you are probably better off with C/C++ (or something else more 'modern'), see for example Daniel Veillard's LIBXML2 library at http://xmlsoft.org/ or Frank van den Berghen's parser at http://www.applied-mathematics.net/tools/xmlParser.html.
If you have to use a dialect earlier than FORTRAN-90 (F90), then the chances are you will have to code your own parser.
Software Development Kits
For later dialects, there are some SDK's available on the Web:
- F90:
- XMLPARSE - by Arjen Markus at http://xml-fortran.sourceforge.net/
- FoX - by Toby White & others at http://uszla.me.uk/space/software/FoX/
- For F95:
- XML - by Mart Rentmeester at http://nn-online.org/code/xml/
canSAS 1-D SAS XML v1.0 support
Steve King[1] (ISIS) has provided a F77 routine (SASXML_G77.F) that will read CanSAS XML v1.0 files.