ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
[boost] API Review request: XML API for C++, second round
by Stefan Seefeld other posts by this author
Jun 25 2003 12:12AM messages near this date
RE: [boost] Trouble building latest CVS (Intel 7.1 and VC7) | [boost] Re: API Review request: XML API for C++, second round
hi there,

some weeks ago I proposed an API for XML, which triggered an interesting
discussion. Hamish Mackenzie proposed a somewhat simpler mechanism to attach
the C++ wrapper objects to the C structs from libxml2.

I reworked the API to use that mechanism, so now using an xml document
looks somewhat like:

dom::document_ptr document("1.0");
dom::element_ptr root = document.create_root_node("root");
dom::element_ptr child = root.append_child("child");
dom::text_ptr text = root.append_text("hello world");
for (dom::element_ptr::child_iterator i = root.begin_children();
      i != root.end_children();
      ++i)
   std::cout << i-> get_name() << std::endl;

As the wrapper objects have reference semantics, I append '_ptr' to
their name to stress that fact. A practical side-effect of this is
that the document is now ref-counted, as it doesn't own the node-wrappers
any more (as was the case in my former API).

Please review the package 'xml++-2003-06-24.tgz' at
http://groups.yahoo.com/group/boost/files/xml/

Kind regards,
		Stefan

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Stefan Seefeld
Anthony Williams
Hamish Mackenzie
Stefan Seefeld
Anthony Williams
Hamish Mackenzie
Bohdan
Stefan Seefeld
Hamish Mackenzie
Stefan Seefeld
Hamish Mackenzie
Hamish Mackenzie
Stefan Seefeld
Hamish Mackenzie
Stefan Seefeld
Hamish Mackenzie
Stefan Seefeld
Hamish Mackenzie
Bohdan
Stefan Seefeld
Stefan Seefeld
Hamish Mackenzie
Stefan Seefeld
Hamish Mackenzie
Hamish Mackenzie

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved