[due diligence] std.xml

div0 div0 at sourceforge.net
Tue Oct 19 12:57:42 PDT 2010


On 19/10/2010 20:37, Andrei Alexandrescu wrote:
> On 10/19/10 14:30 CDT, Denis Koroskin wrote:
>
> More detail about the design please? I browsed through the code and the
> main issue seems to be heavy reliance on granular delegates to do pretty
> much anything. Would fixing that improve usability? (It would most
> likely improve performance.)
>
> Andrei

Well one obvious problem is you have to read the document into memory 
first, which clearly isn't good enough for large documents.

Secondly it doesn't handle xml namespaces properly.

namespaces are critically important for parsing most xml documents in 
practice.

Otherwise it should be a heavily template based design sort of like 
boost::spirit so you can process tags/arbitiutes as they are parsed for 
maximum performance.

If we have XML in the std library, it's really got to be a 100% 
standards conformant implementation; otherwise it's a waste of space.

I spend a couple of weeks writing an XML parser; but I skipped the more 
obtuse bits. Doing it properly is a large chunk of work and it's dull as 
f*ck.

-- 
My enormous talent is exceeded only by my outrageous laziness.
http://www.ssTk.co.uk


More information about the Digitalmars-d mailing list