EPUB Documentation
Alix Pexton
alix.DOT.pexton at gmail.DOT.com
Thu May 16 04:18:53 PDT 2013
On 15/05/2013 12:45, Russel Winder wrote:
> On Wed, 2013-05-15 at 12:27 +0100, Alix Pexton wrote:
> […]
>> libxml2 and its kin should definitely get the deimos treatment!
>
> Indeed. Sadly, I doubt I will have time to even look at it for at least
> a couple of months.
I took a look... Why is it that I find the prospect of moulding a
wrapper around a c-lib more daunting than writing my own d-lib from scratch?
Mike Parker's GameDev.net has made a timely arrival, but although
reading it makes me feel more knowledgeable about the process, I feel no
more confident ><
>> I don't know how hard it might be to create a wrapper with an
>> idiomatically D-ish interface though.
>
> I guess the trick will be to look at how lxml provides the ElementTree
> API (very Pythonic) over libxml2 and take a leaf from that book.
There is a section on the lxml website that goes into very brief detail
about how the binding works, it uses cython to wrap the c structs into
proxy objects. I should probably say that while I have written code in
python, I have never written any pythonic code, I'm not sure what it
should look like, so I don't think looking at lxml would give me any
insight into how to wrap libxml2. After all, getting away from python is
my motivation for putting better XML support into D.
> I am assuming SWIG would not be a good idea here.
That would be a question to ask a SWIG guru (or even a htod guru).
A...
More information about the Digitalmars-d
mailing list