Please also look at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2101.html . As an XML document has a tree structure, I guess an XML DOM interface should implement a C++ tree container interface. The above paper suggests some important principles for tree-like containers in C++. Maybe someone could comment on the state of this paper. Regards Simon Am Montag, den 29.04.2013, 23:32 +0200 schrieb Daniel Pfeifer:
2013/4/28 Andrey Semashev
IMHO, support for SAX is also mandatory. I would even say that SAX should be the first and the primary thing to be implemented in Boost.XML, as DOM can be added later on top of it if the time for GSOC allows.
Personally, I find pull-parsing much more convenient than SAX. But personal preferences put aside, there are generally three approaches to parsing XML:
1. DOM 2. SAX, push-parsing, callback-driven 3. StAX, pull-parsing, streamreader
Each approach is better than the two others in some way. We need them all three in Boost (and then in the standard). I believe that these three approaches may share some code, but don't need to be based upon each other.
You might want to look at pugixml [1], a "Light-weight, simple and fast XML parser for C++ with XPath support". There might be a reason why it is not built on SAX. Concerning pull-parsing, llamaxml [2] and the streamreader from Qt [3] and may be of interest. I also wrote a simple stream reader (and writer) that you might find helpful [4].
[1] http://pugixml.org/ [2] http://llamaxml.berlios.de/ [3] http://qt-project.org/doc/qt-4.8/qxmlstreamreader.html [4] https://github.com/purpleKarrot/xml
cheers, Daniel
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost