Re: [xml] modifying tree and attributes



Daniel Veillard wrote:


 I would say the library should be made as resilient as possible.
I'm just a little puzzled so wanted to get some clarification. Getting a patch together - so far it stands as (and yes all applicable tests pass for both libs) : http://www.ctindustries.net/libxml/tree.c.diff.txt

Did a search on xmlAddChild to find out why it doesnt perform unlink and came across:
http://mail.gnome.org/archives/xml/2003-February/msg00009.html

Now, like the changes in my patch, of course the behavior will change (prevent tree corruption and some memleaks) which is what adding unlink would do in addchild.

My confusion comes back to the resilient vs. caller responsibility issue.

Thanks,

Rob




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]