Friday, June 29, 2007, 7:11:10 PM, Marco wrote: MvdV> On Thu, Jun 28, 2007 at 01:23:09PM -0300, Luiz Americo Pereira Camara wrote: >> Alvise Nicoletti wrote: >> > I have to parse xml both with Lazarus on linux (server) and Delphi on >> > Windows (client). >> > >> > Actually, with Lazarus, I'm using the DOM, ReadXML, WriteXML units. >> > >> > Is there something that I can use in Delphi with the same code? Or, >> > otherwise, is there some XML component compatible for both Delphi and >> > Lazarus? >> > >> >> Some time ago i ported the fpc dom unit to delphi. It was just a matter of >> changing the places of const sections, no change was made at all, if i >> remenber well. I can send to you but is a bit outdated. A better option is >> to try to compile the most recent fpc dom version, probably will be easy.
> I use the Lazarus dom, xmlcfg etc units under Delphi also. But mostly for > configuration file (and application GUI state saving) purposes. Afaik the > lazarus ones are like the FPC based, but ansi and not widestring based. > There were some modifications IIRC, but they were pretty trivial. During the last year I had made severe modifications to FPC XML units. The current version is fully compliant with W3C test suite, supports UTF-8 and UTF-16 encodings, XML 1.1, entity processing and DTD validation. This stuff (namely DOM.pp, XMLRead.pp, XMLWrite.pp, XMLUtils.pp and UriParser.pp from packages/base/netdb) also compile with Delphi 7 without any changes. I also successfully compiled Lazarus locally using modified FPC units, and it proves working. I did not release this patch to public for several reasons: a) The patch isn't complete - it just changes used units while all string variables outside those units remain ansi. b) There are known issues with WideStrings on Windows. Although at a glance everything seem not to be touched by these issues, I cannot be sure it really isn't. c) Performance issues - the Widestring-based reader is somewhat slower than current AnsiString-based. Nevertheless, if anyone is interested in incorporating these changes into Lazarus, I will send the patch. Best regards, Sergei Gorelkin _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives