can someone has completed the (previously speaked into this news) speed
benchmark of XML opensource parsers?
Or please can someone already has a report of parser speed, so to me
indicate the fastest component to use?
Really TNX, please post to my email (only if you like).
Again regards,
Roberto.
Fastest OpenSource is probably Expat, but it is not written in Delphi.
Karl
C.
Maybe AElfred: http://xml.defined.net/SAX/aelfred2/
Ask Jeff Rafter if he has a new version you can test.
Karl
the fastest DOM2 compliant XML-parser for delphi is the libxml2 based
dom implementation from the IDOM2 project.
The dom layer is implemented in object pascal, but parsing is done by
the underlying C engine.
It's about twice as fast as xerxes, and has many more features than
expat. Compared to msxml, you have about the same speed for parsing
documents, and some tests, like treewalking, are three times as fast.
It is validating, supports dtd's, xpath and xslt, and soon it will
offer schema support, too.
A setup program is under development (in the moment you have to install
four packages seperatly).
Give it a try:
http://sourceforge.net/projects/idom2-pas/
Regards:
Uwe Fechner
If speed is important, then a SAX interface should be used.
Is there a SAX interface too? If yes, is it compatible with SAX for Pascal?
Karl
>Is there a SAX interface too? If yes, is it compatible with SAX for Pascal?
Jeff Rafter has had Sax for Pascal Support to Sablopas. Sablopas is an OP
wrapper for Sablotron.
http://www.tekool.com/sablopas
> the fastest DOM2 compliant XML-parser for delphi is the libxml2 based
> dom implementation from the IDOM2 project.
Any possibility in the future, that it can coexist with Borlands default
parser?
--
Med venlig hilsen / Best regards
Stig Johansen
stig.j...@udvikling.it.dk
(remove dot dk)
I suppose, you mean msxml combined with with xmldom.pas with the
phrase "borland default parser".
To a far extend it is already compatible with borland:
Just write:
uses idom2, idom2_ext, libxmldom;
instead of
uses xmldom;
And with our units, you can still switch between msxml and libxml2
and runtime.
Here:
http://sourceforge.net/projects/idom2-pas/
you find a guide, how to convert your programs, if you used xmldom before.
I first wrote libxmldom as an implementation of the interfaces, defined
in xmldom.pas from Borland, but because Borland didn't give us the
permission, to publish this interface unit under an open source license,
we switched to the interface-unit idom2.pas from Martijn Brinkers.
It is pretty much the same, we only moved the microsoft specific stuff
to the unit idom2_ext, tried to avoid some bugs in the borland unit,
and tried to keep closer to the standart as defined by w3c.org.
And idom2.pas defines some interfaces, that make it easear, to port
programs from java to delphi.
If you want to change libxmldom.pas in a way, that it implements the
interfaces, as defined in xmldom.pas, you could do it yourself within
an hour.
Well, one thing is still missing, and that is the nice little component
TDomDocument.
We don't use this component ourself, so I don't know, wether it is
compatible to idom2.pas, but we would be very happy, if someone finds
the time, to write a similar open source component for idom2.pas.
We would be happy for any help, to add an sax interface to this parser,
too. Libxml2 offers some (limited) sax functions, but because I don't
have any experience with sax myself, it is difficult for me, to write
a wrapper, that offers proper delphi interfaces to these libxml2 sax
functions.
Best regards:
Uwe Fechner
It is not, but I would like to write one. Libxml2 offers some limited
SAX fuctions, and it would be nice to be able to access them. Because I
don't have any experience with SAX, it is a little bit difficult for me.
If someone would help me, I would try to do it.
Best regards:
Uwe Fechner
I suppose, you mean msxml combined with with xmldom.pas with the
Just write:
uses idom2, idom2_ext, libxmldom;
instead of
uses xmldom;
Here:
http://sourceforge.net/projects/idom2-pas/
TXMLDocument.
It is not, but I would like to write one. Libxml2 offers some limited
SAX functions, and it would be nice to be able to access them. Because I
I submitted the wrong URL for the user guide.
Here:
http://sourceforge.net/docman/display_doc.php?docid=10387&group_id=46835
is the corrected link.
Regards:
Uwe
> I suppose, you mean msxml combined with with xmldom.pas with the
> phrase "borland default parser".
Exactly, and underneath msxml on M$ windows, and OpenXML on Linux.
> To a far extend it is already compatible with borland:
> Just write:
> uses idom2, idom2_ext, libxmldom;
> instead of
> uses xmldom;
Yes, but I cannot get the Borland SOAP implementation to work without the
xmldom and underlying oxml/msxml. Therefore I need to use both xmldom and
libxmldom.
> And with our units, you can still switch between msxml and libxml2
> and runtime.
Well, I am primarily talking about switching between OpenXML and libxml2.
> I first wrote libxmldom as an implementation of the interfaces, defined
> in xmldom.pas from Borland, but because Borland didn't give us the
> permission, to publish this interface unit under an open source license,
What a pitty, things could be so easy if this interface was published.
> It is pretty much the same, we only moved the microsoft specific stuff
> to the unit idom2_ext, tried to avoid some bugs in the borland unit,
Interesting, is it possible to elaborate?
> If you want to change libxmldom.pas in a way, that it implements the
> interfaces, as defined in xmldom.pas, you could do it yourself within
> an hour.
Since my previous post, I invested some time to try to get it to work.
My problem here (On the linux side) is, that I need to transform XML using
XSL. This is NOT supported by the OpenXML, which is included in the K2 ent.
I had previously succeded using sablotron (sablotxmldom.pas).
If I use idom2, I had some conflicts, since some of the names is the same as
defined in xmldom from Borland.
Today, I WANTED to get idom2 to work, at least to do a transform. I managed
to get it to work.
Basically, I changed the libxmldom to use the xmldom instead of idom2. Apart
from this, I created a new unit, idom2_diff, which contains the differences
used by libxmldom.
Furthermore, I changed idom2_ext to use xmldom instead of idom2, and deleted
some stuff, that was defined in xmldom.
So the issue by having libxml coexist with 'Borland default' is solved by
doing this. So basically, I think it is just to 'reorganize' the units.
For the time being, I would suggest that you reorganize the units, so it is
possible for everybody to use libxml2 as well as 'xmldom'.
As mentioned above, I have a working solution, but only how to use libxml2
as well as xmldom. I would like to publish the parts of the units I use
when I get the time (Hopefully within a day or two).
I haven't tested speed on libxml yet, but in my tests Expat was eons
faster... this was because most parsers in Delphi use strings rather than
PChars/PWideChars. Karl has also written a wrapper for MSXML in "buffered"
mode which was very fast. Finally Stefan Heymann has a parser at
destructor.de that is very fast (and native Pascal) although it does not yet
implement DOM or SAX.
http://xml.defined.net/parsers.xml
It might be a good idea to add speed results to the document... anyone
interested in coming up with some results? I would be happy to post them...
Cheers,
--
Jeff Rafter
Defined Systems
http://www.defined.net
XML Development and Developer Web Hosting