Re: [libxml++] Proposition: nodes manipulation
- From: Stefan Seefeld <seefeld sympatico ca>
- To: libxmlplusplus-general lists sourceforge net
- Subject: Re: [libxml++] Proposition: nodes manipulation
- Date: Tue, 01 Jun 2004 09:46:57 -0400
Christophe de Vienne wrote:
Currently, the lifetime of nodes is controlled by libxml2, via callbacks
on node ceation/deletion. The restrictions are that we cannot create a
standalone node, nor detach and then delete a node like a normal class
instance.
Why do you believe this is a restriction ? Being able to unlink a node
from its document will open up a big can of worms. Not only will you
have to deal with resource allocation issues (until now nodes are owned
and thus taken care of by a document), but there are other issues such
as context data that are required for the node to make sense. Just think
about namespaces.
Sometimes it's better for an API to make it hard (if not impossible)
for users to do certain things, just because there are better ways
to achieve what they want.
Regards,
Stefan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]