Phobos Proposal: replace std.xml with kxml.
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon May 3 16:01:30 PDT 2010
Graham Fawcett wrote:
> On Tue, 04 May 2010 09:18:46 +1200, Bernard Helyer wrote:
>
>> When I first started using D, one of the things I needed quite early on
>> was a way of writing and reading XML. Naturally, when I saw std.xml in
>> Phobos, I was quite pleased.
>>
>> That was of course, until I started to use it.
>>
>> http://d.puremagic.com/issues/show_bug.cgi?id=3088
>> http://d.puremagic.com/issues/show_bug.cgi?id=4069
>> http://d.puremagic.com/issues/show_bug.cgi?id=3201
>>
>> I vented my frustation on IRC, where opticron mentioned he had an XML
>> library of his own. I find it superior to std.xml, especially
>> considering how it actually works, and is maintained.
>>
>> http://opticron.no-ip.org/svn/branches/kxml/
>>
>> It is already under the Boost License, and opticron has said
>>
>> "<opticron> ... if they really want to snag mine and clean it up for use
>> in phobos, that's fine
>> <opticron> I'd even relicense the code if I have to"
>>
>> I'm going to keep on using kxml regardless, but I thought it would be
>> nice if Phobos had a working XML library. What say you?
>
> I haven't looked at kxml -- but why not just wrap libxml2? It's widely
> regarded as a fast, stable, portable and *correct* XML library. I wrote a
> partial libxml2 wrapper (mostly the tree.h stuff, and some libxslt) in
> under an hour as a learning exercise; someone with real D chops could
> turn out a polished interface in short time.
>
> The fact that libxml2/libxslt support not only XML parsing and DOM
> building, but also XSLT, XPath, XPointer, XInclude, RelaxNG, etc., means
> that any homegrown library will be hard-pressed to cover the same range
> of tools and features.
>
> There are too many half-baked XML libraries in the world. No disrespect
> intended to opticron or anyone else; it just doesn't make a lot of sense
> to reinvent such a complex wheel (and believing that XML processing isn't
> complex is a sure sign that your homegrown library's design is
> incomplete!).
>
> Graham
I think what we need for the standard library is to take a solid XML
library licensed generously and adapt it to work with arbitrary ranges.
Andrei
More information about the Digitalmars-d
mailing list