std.xml2 (collecting features)

Joakim via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 23 03:22:23 PST 2016


On Friday, 19 February 2016 at 12:13:53 UTC, Chris wrote:
> On Sunday, 3 May 2015 at 17:47:15 UTC, Joakim wrote:
>> On Sunday, 3 May 2015 at 17:39:48 UTC, Robert burner Schadek 
>> wrote:
>>> std.xml has been considered not up to specs nearly 3 years 
>>> now. Time to build a successor. I currently plan the 
>>> following featues for it:
>>>
>>> - SAX and DOM parser
>>> - in-situ / slicing parsing when possible (forward range?)
>>> - compile time switch (CTS) for lazy attribute parsing
>>> - CTS for encoding (ubyte(ASCII), char(utf8), ... )
>>> - CTS for input validating
>>> - performance
>>>
>>> Not much code yet, I'm currently building the performance 
>>> test suite https://github.com/burner/std.xml2
>>>
>>> Please post you feature requests, and please keep the posts 
>>> DRY and on topic.
>>
>> My request: just skip it.  XML is a horrible waste of space 
>> for a standard, better D doesn't support it well, anything to 
>> discourage it's use.  I'd rather see you spend your time on 
>> something worthwhile.  If data formats are your thing, you 
>> could help get Ludwig's JSON stuff in, or better yet, enable 
>> some nice binary data format.
>
> Glad to hear that someone is working on XML support. We cannot 
> just "skip it". XML/HTML like mark up comes up all the time, 
> here and there. I recently had to write a mini-parser (nowhere 
> near the stuff Robert is doing, just a quick fix!) to extract 
> data from XML input. This has nothing to do with personal 
> preferences, it's just there [1] and has to be dealt with.
>
> [1] 
> https://en.wikipedia.org/wiki/Speech_Synthesis_Markup_Language

Then write a good XML extraction-only library and dub it.  I see 
no reason to include this in Phobos, which will encourage those 
who don't know any better to use it, since it comes with the 
compiler.  I'll close with a quote from Saint Linus of Torvalds, 
which I was unaware of till a couple days ago:

"XML is crap. Really. There are no excuses. XML is nasty to parse 
for humans, and it's a disaster to parse even for computers. 
There's just no reason for that horrible crap to exist."
https://en.wikiquote.org/wiki/Linus_Torvalds#2014


More information about the Digitalmars-d mailing list