[fpc-pascal] XML: Differences between Delphi and FPC

Michael Van Canneyt michael at freepascal.org
Sun Jul 30 10:06:49 CEST 2017



On Sat, 29 Jul 2017, Marcos Douglas B. Santos wrote:

> Hi,
>
> FPC/Lazarus always tried stay compatible with Delphi... thus, why the
> FPC XML classes is so different than Delphi classes?

Because the FPC classes predate the Delphi classes. 
They were based directly on the W3 DOM specifications.

>
> Delphi XML is interface-based. There exists IXMLDocument, IXMLNode and so on.
> FPC has just classes.

The interfaces are needed only because Delphi uses the MS XML library, which
is interface based. Since FPC does not use the MS XML library, it has no
need of the interfaces.

>
> I have a FPC/Lazarus project that will be compatible with Delphi. I
> would like to know whether I need to create wrappers to encapsulate
> the differences between them or there is a simple way to do that.

If I remember correctly, the WST project has a wrapper for delphi which acts
like the FPC version. It's called wst_delphi_xml.

Michael.



More information about the fpc-pascal mailing list