[fpc-pascal] XML unit selection

Marc Santhoff M.Santhoff at t-online.de
Tue Nov 14 00:16:18 CET 2006

Am Montag, den 13.11.2006, 10:53 +0100 schrieb Michael Van Canneyt:
> On Mon, 13 Nov 2006, Marc Santhoff wrote:
> > Hi,
> > 
> > while planning an XML-centric program I found some related units in the
> > fcl sources and many more inside the lazarus source tree.
> > 
> > Which set of them would be the best choice?
> It depends on what you want. The XML support in FPC is based on the
> DOM specifications. It is also tested against the specs on W3.

Good to know. So nothing speaks against using the fcl xml suport.

> > 
> > According to the comments in some files there is (or was) change to
> > come.
> > 
> > Do these xml parsers validate against a schema file (.xsd)?
> No, the parsing is currently not validating. I think Sergei Gorelkin
> planned this, but I am not sure.

I think for my purposes (detecting type of element) it'll be enough to
read in the schema file and address the type attribute of the element
directly from the resulting dom object. I do not need to ensure
structure or completeness, the files are machine generated.

> > 
> > My goal will be parsing (of course) and looking up types of read
> > elements in .xsd files for further evaluation. Techniques to use will be
> > both, sax-style stream parsing and building DOM trees. The program will
> > have a gui, so lcl will be in use, too.
> The FCL contains a SAX 2 compliant reader.

So my requirements are met, speed is not a big issue in this case.

Thank you both,

More information about the fpc-pascal mailing list