Proposal: XML APIs in boost

On 11/1/05, Suman Cherukuri <suman@cherukuris.net> wrote:
Xerces has good C++ support. I'm not sure if this discussion is about extending 'C' based XML parsers like libxml2 and Expat to provide C++ interface or to have a whole new XML parser within Boost. If it is later, Why?
I agree with Doug Gregor, that something like parsing can be offloaded onto another library like Xerces/libxml2/etc, so I think the value of discussion is in the manipulation and navigation within an XML document. That's where modern C++ techniques could really be applied to great effect. My 2 cents worth regarding the XML libs I've used: Xerces has a bunch of C++ classes ensconced in namespaces, but it feels like a C API dressed up in C++. There is zero in the way of common C++ abstractions for manipulating or accessing a document. It just felt laborious to use--I couldn't escape the thought of "if you're going to write it in C++, how about actually using C++?" With libxml2 I didn't have the "C++ expectations" because it's an all-C API. I still found myself doing the same lower-level node memory-management stuff I had to deal with in Xerces, but I wrote a few brain-dead simple wrapper classes for just the functionality I needed and everything felt so much easier. I suppose the difference is that I expected a whole suite of well-designed wrapper classes along with Xerces and felt let down that they didn't exist. (Plus, I needed RelaxNG schema and XPath support, neither of which Xerces had). -- Shawn Halpenny
participants (1)
-
Shawn Halpenny