Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-11

XML unit selection

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Santhoff

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?

According to the comments in some files there is (or was) change to come.

Do these xml parsers validate against a schema file (.xsd)?

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.

TIA,
Marc

Michael Van Canneyt
to Marc Santhoff
Marc Santhoff wrote 6 lines
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.

Show quoted text 5 lines
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.

Show quoted text 5 lines
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.

Michael.

Mattias Gaertner
to Michael Van Canneyt
Show quoted text 13 lines
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.

The lazarus xml units are speed optimized versions for XML config files. They are 2 to 10 times faster, because/but do not convert special characters.

Show quoted text 15 lines
> 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. > > 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.

Mattias

Marc Santhoff
to Michael Van Canneyt: It depends on what you want. The XML support in FPC is based on the DOM specifications.…
Michael Van Canneyt wrote 12 lines
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.

Show quoted text 8 lines
> > 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.

Show quoted text 7 lines
> > 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,
Marc