Topic: TIXI XML for gfortran

Hi Jeff,

I would like to use the Open Source program TIXI which provides functions to manipulate XML files.  Thus far I've been unsuccessful in using it in Simply Fortran. Is this a package that could easily be used with or compiled in SF?  Below are some links to TIXI which includes binaries and source code.

The TIXI XML Interface is available for Linux and MS-Windows platforms. It currently supports TIXI for Windows and Linux, but it can be compiled on many different platforms e.g. Mac OS X, ARM based devices etc.

https://github.com/DLR-SC/tixi/wiki/InstallationHowto

https://github.com/DLR-SC/tixi/releases

https://github.com/DLR-SC/tixi

https://github.com/DLR-SC/tixi/wiki/Fortran%20Examples

Frank

Re: TIXI XML for gfortran

Frank,

I'll have a look at it today.  I should be able to put together a project that builds the library.

Jeff Armstrong
Approximatrix, LLC

Re: TIXI XML for gfortran

Jeff,

Thank you for considering the TIXI XML library for Simply Fortran.  Ease of access to XML templates would provide added functionality to Simply Fortran.

November 24, 2020
Description

TiXI is a fast and simple XML interface library and could be used from applications written in C, C++, Fortran, JAVA and Python. The library can be directly integrated into a code by third party software or can be used by users who don't want to deal with the complexity of XML when creating a new application. Although simplified and somewhat restricted compared to a full-fledged XML processing library the user can, for example, create documents, create and delete nodes, and add and remove element attributes. Routines to read and write simple text nodes and additionally specialized nodes holding integer and floating point numbers are part of this API. Furthermore, routines to process aggregates of these simple types have been implemented. For the processing of geometric data, reading and writing of multidimensional arrays or arrays of vectors, i.e. coordinates of points are supported. The library has been designed to hide the implementation details so that the underlying XML library, currently libxml2, can be replaced by another one without changing the XML processing API in the applications.

Frank

Re: TIXI XML for gfortran

Frank,

I've been starting on building a package for TIXI, but it has some pretty large requirements for building.  Specifically, it relies on libxml2 and libxslt.  These libraries are substantial and require quite a few dependencies (including libcurl, which also isn't trivial).  It'll take a while longer to get a TIXI package compiling.

I normally hesitate to use pre-existing binaries.  However, it adds a lot of effort trying to get these dependencies built.  The TIXI build scripts don't seem to be particularly well thought-out, so there are some dependency issues remaining.

Jeff Armstrong
Approximatrix, LLC

Re: TIXI XML for gfortran

Jeff,

Thank you for informing us on the status of the TIXI build.  It doesn't surprise me that it's more complicated than original thought.  I was hoping that you could use the libxm2, libxslt, and libcurl binaries available online. I admire your tenacity for doing things the correct way. I'm still hopeful that you can get it working. 

The reason that I'm so interested in TIXI is because I've been asked by two academic department heads from the USA and Germany to participate in a STRENDA (Standards for Reporting Enzymology Data) project to help in providing data on enzyme kinetics to an opensource Global database.  Basically, my Simply Fortran program (www.enzymkinetics.com) must be able to read and write to XML files and send them to a Global server.  I volunteered to assist as best as I can, but I've never worked on a project like this before. As with TIXI, I was hoping that it doesn't turn out to be more complicated than it initially appeared.

Thanks for your help; I don't know where you find the time for all these projects. You must be running on a different clock.

Frank

Re: TIXI XML for gfortran

Frank,

We'll get TIXI running for sure. I plan on adding it as a package in the SF Package Manager along with its dependencies.  It just takes time to sort out the Windows builds as usual.

Jeff Armstrong
Approximatrix, LLC

Re: TIXI XML for gfortran

Jeff,

I have a couple of basic questions regarding SF and PkgMgr.

1- Can I use PkgMgr with SF v2.0, or do I need to purchase SF 3.0?

2- Way back in time, I was using PkgMgr but that was when you were developing it.  I've not used it since, so I assume that the old version is no longer functional.  If so, I'm okay with that.

I'm thinking that it may be time to upgrade both SF and PkgMgr. 
Can both of these be purchased together as a package?

Lastly, PkgMgr likely comes with examples of each application.  Would it be too much to ask to include a FORTRAN example using TIXI and CURL that (1) communicates to a URL, (2) downloads an XML file, (3) reads the XML file, (4) writes to the XML file, and then sends the update back to the server? 
If I'm not mistaken, I was hoping that is what TIXI actually does.  Or must you use the command line CURL to access a server first?

Sorry about all these questions, but I'm new at this XML server stuff and could use some guidance.  An example would be very helpful.

Grateful for your effort to include TIXI in PkgMgr,
Frank

Re: TIXI XML for gfortran

Frank,

The TIXI package won't work with Simply Fortran 2.0 because its compiler is outdated at this point.  While it doesn't actually use any Fortran modules (necessarily...), you'll almost certainly run into linking issues with the runtime library and TIXI. 

I believe your account on the package manager was perpetual.  I'll need to check.  You can buy them together, though.

The package comes with a very simple project that executes a basic program using the TIXI API in Fortran.  In your example, though, you wouldn't want to use curl directly.  We don't provide a Fortran wrapper for curl, so you'd probably want to use TIXI's tixiOpenDocumentFromHTTP call.  You could write a curl wrapper or call curl through the command line, though.

Jeff Armstrong
Approximatrix, LLC

Re: TIXI XML for gfortran

Frank,

Your SF Package Manager account is still valid (just checked).  You may have to at least install Simply Fortran 3.18 first  in order for the package manager to detect the proper Fortran compiler version, though I do not believe the TIXI package specifies one.

Jeff Armstrong
Approximatrix, LLC