From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2007-07-13 15:45:34
Stuart Dootson wrote:
> Stefan - I've spent a few hours today porting a small (500 line) C#
> application to C++ using your libxml2 wrapper code. Overall, for what
> I've done, I liked it - there did seem to be some bugs (but that could
> be due to deficiencies in VC8), and I could see some opportunities for
> some conveniences. However, it enabled me to translate my 500 lines of
> C# to 500 lines of C++, produce the same results and gain a 6x
> performance increase in the process (woot!).
That's excellent news (and a welcome change in this thread ;-) ) !
> What was I doing - well, mainly iterating through nodes and evaluating
> attribute values. For these functions, it would be nice to have some
> form of filtering/transforming iterator layered on top of an elements
> children_iterator that allows you to specify some subset of the
> children that you want to see. I wrote a modified for_each that
> performed an equivalent function (yes, I should have used Boosts
> iterator adaptors). Also, it would be nice to have a typed attribute
> value retrieval function. I knocked something up using lexical_cast
> that did that - it'd be nice if it was in the library.
Have you had a look at the 'traversal.cpp' example ? That may do what
you want. (Some generalization of that may become part of the public API.)
> I also performed some XML tree construction - it was a pretty flat
> structure, and I found the provided functions adequate for that.
> As for the 'bugs' - well, I had to modify your code in places to get
> my code to build (the code is at work, so it'll be Monday before I can
> get at it again and post diffs if you're interested). I also had
> issues compiling the dom.cpp file with VC7.1 and VC8 - to get VC8 to
> build it, I had to move the factory and ptr_factory functions out of
> the details namespace - VC8 just wouldn't admit to seeing those
> functions otherwise.
Yes, I'd appreciate any patches, especially if they explain the proposed
changes. I'm not sure what the best way to do that is, though. Can trac
be configured to allow sandbox-project-specific issues ?
-- ...ich hab' noch einen Koffer in Berlin...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk