Re: [libxml++] Adding STL-container-like methods to Node instead of returning container instance (xmlwrapp)



Murray Cumming wrote:

can yo elaborate why you think that 'STL-like' and 'DOM-like' are
mutually exclusive ?


I didn't say that they are. But xmlwrapp seems to be
a) more STL-like
and
b) less DOM-like.

Actually they are slightly mutually exclusive because the DOM
specification specifies an API which is not STL-like.

oh, I agree. That's probably because all the DOM and related APIs were
crafted with java in mind. Still I don't see a problem. The (proposed)
C++ API is more low level, so we could put a 'DOM API wrapper' on top
if we want. But only providing a DOM API (i.e. not being able to use
C++-specific idioms) would be wrong, I believe.

In fact, since we are discussing a DOM API now, please have a look at

http://xml.apache.org/xerces-c/ApacheDOMC++BindingL2.html

There is quite a lot to change if we really wanted to be compliant
with this. I'm not against providing a DOM-C++ API. But again, I think
we should take advantage of C++ techniques whenever we can, and
provide the DOM API on top of it.

Stefan





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