Re: [xml] libxml2 API crazy?
- From: Nikita Churaev <lamefun x0r gmail com>
- To: "Eric S. Eberhard" <eric vicsmba com>
- Cc: "xml gnome org >> \"xml gnome org\"" <xml gnome org>
- Subject: Re: [xml] libxml2 API crazy?
- Date: Thu, 02 May 2013 08:39:47 +0400
Further -- my own advice -- wrap everything in your own functions.
This protects against changes or casting problem and makes the API
work like you expect.
Why a layer of abstraction? This issue is mainly about lack of
documentation and safe casting functions. I think it would be better to
improve the libxml2 itself. Here's my current attempt on this:
https://github.com/lamefun/libxml2
Specifically:
https://github.com/lamefun/libxml2/blob/sanity/include/libxml/tree.h#L512
and
https://github.com/lamefun/libxml2/blob/sanity/include/libxml/tree.h#L1334
I'm documenting all the insanity and adding safe cast functions like
xmlDocToNode and xmlNodeToDoc that check node types.
If I'm doing something stupid, please tell me.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]