Recent

Author Topic: Has anyone got the TXMLINI unit to work reliably with later Lazarus versions?  (Read 2744 times)

otoien

  • Jr. Member
  • **
  • Posts: 89
I tried out the TXMLINI file unit, http://sourceforge.net/projects/txmlini/ which can work as an XML based replacement for the inifiles unit, and while I could make it compile (the Controls unit had to be commented out), I had problems with getting exceptions during run time on the file handles in the TFileStream.Create constructor. However in a few cases it was able without crash to write the XML file, but on read of the same file it would fail to detect the float values. This unit is getting somewhat old (2005), and I am not even completely sure it was developed for Lazarus/FreePascal, perhaps it is more Delphi oriented. (Most of the documentation and comments in the code is in a language I cannot read).

So I am curious if anyone happen to have gotten this working reliably?

I am using Lazarus 32 bit version on 1.4.2 - FPC 2.6.4 - SVN 49524 or fixes branch 1.4.3 - FPC 3.0.1 ; there are problems on both.
« Last Edit: September 04, 2015, 08:45:11 am by otoien »
Unless otherwise noted I always use the latest stable version of Lasarus/FPC x86_64-win64-win32/win64

derek.john.evans

  • Guest
Eck. That code parses its own XML. Not a great idea.

Try TXMLConfig in xmlconf.


otoien

  • Jr. Member
  • **
  • Posts: 89
Thanks, I will likely let TXMLINI rest. I hoped for a quick and not so dirty way to quickly judge how output of my inifile routines would look like if coded in XML.

A very naive question: What is the alternative used in XMLConf to "parsing its own XML"? By the system? others?
Unless otherwise noted I always use the latest stable version of Lasarus/FPC x86_64-win64-win32/win64

derek.john.evans

  • Guest
What is the alternative used in XMLConf to "parsing its own XML"? By the system? others?

XMLConf is part of the FreePascal XML (fcl-xml) library. It uses the units DOM, XMLRead and XMLWrite.

For basic string storage, DOM is a little overkill, but, then it does upscale. I see XMLConf as a stepping stone to XML. ie: You can start with XMLConf  and if you find the application grows behond its features, then you can always start accessing the underling TDOMElement.

otoien

  • Jr. Member
  • **
  • Posts: 89
Thanks for the explanation. So it is based on an international standard.
Unless otherwise noted I always use the latest stable version of Lasarus/FPC x86_64-win64-win32/win64

 

TinyPortal © 2005-2018