Another XML DOM Package

apz28 via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Jan 5 17:48:40 PST 2017


On Wednesday, 4 January 2017 at 22:48:30 UTC, Guillaume Piolat 
wrote:
> On Friday, 30 December 2016 at 04:19:47 UTC, apz28 wrote:
>> This is my first package to learn D. Suggestion for 
>> improvement is welcome.
>>
>> https://github.com/apz28/dlang-xml
>
> Welcome here!
>
> - you don't have to commit .sln files, dub can generate them as 
> needed
> - that is for a package that will be reused you can use dub :)
> - no need to use @property, there was a recent discussion about 
> it. I think you can ignore it altogether.
> - you can use "final" before a class declaration to have all 
> methods be final
>
>   final class C { /* all methods are final /= }
>
> - no need for "public import std.exception : Exception;" to use 
> Exception
>
> imho the XML parser to beat in our ecosystem is kxml, which is 
> small and serviceable

1. no need for "public import std.exception
Fixed

2. Compare to kxml
- kxml seem be faster but
- kxml is still missing various xml function, such as prefix, 
custom entity, load from file, sax ...
- kxml do not pass the test ibm suit (not able to evaluate 
further) 
(https://github.com/lodo1995/experimental.xml/tree/master/tests/ibm). Died with range violation xml.d(516) for "<doc><![CDATA[</doc>"





More information about the Digitalmars-d-announce mailing list