From: Christophe de V. <cde...@al...> - 2004-09-03 15:35:39
|
Varun Sekhri a écrit : >hi, >yes I have to access that doc pointer, declared in >Document class as private. Please tell me more about >cobj() , which can give the access to a private >member, and allow me to make changes in the document >and hash table associated with it for registering the >ID type attributes. > > http://libxmlplusplus.sourceforge.net/reference/2.7/html/classxmlpp_1_1Document.html#a16 This function is here for cases like yours, when a quick addition of a mapping is not possible, but the use of a libxml functionnality is required. Of course it somehow breaks the encapsulation, but from a pragmatic point of view, it's worth it. >or again, there might be another approach to go. my >problem is that i have to use libxml++, because of >another library built using libxml++. > > It is the simpliest approach possible. In a long term view, you still can propose a patch for a mapping addition, which will be included in the next api version. Regards, Christophe |