Overview
Features
Download
Documentation
Community
Add-Ons & Services

XML Pull parser and others

Discussion of ideas for features and new projects based on POCO.

XML Pull parser and others

Postby kaidokert » 31 Oct 2008, 14:00

Hey, im quite new to POCO and just started converting my own code from my similar classes over to POCO, excellent lib i must say.

I have couple of things that i am using myself that i didnt manage to find in Poco.

XML Pull parsing ? DOM and SAX are there, but StAX and pull parsing model in general is not there. I am aware of two current C/C++ implementations, LLamaXML ( http://llamaxml.berlios.de/ ) and guththila ( Apache AXIS2 component, http://freshmeat.net/projects/guththila/ )

LLamaXML i have been using, with the latest code its possible to read through very big data files with very little memory footprint even if you have big embedded data blobs in XML streams, very useful to read big logs and stuff.

Is anyone working on something similar already or should i try a hand of either wrapping guththila for Poco or do a clean C++ rewrite, fashioned after LLamaXML and using Poco primitives ?

Another tidbit : code profiling. In quite a few instances i have needed a selective code profiling utility, that is present also in deployed code, just to get feedback on how it is performing in different environments. I have a singleton profiledata manager, and then in seleted places of code i have
ProfileBlock _b("cryptocalculations");
and around the main loop i have ProfileBlock _b("global");
ProfileBlock will count call times, and time the executing code, and when it descopes it logs the data to profiledatamanager. When global block exits or manager is destructed, it writes the data out to a stream.

Again, i could try rework it for Poco, or is there something out there already ?

I also have a question on Poco exceptions, why are they all derived from std exception rather than std runtime_error ? just curious, i have been using the latter as base for my own exception trees.

kaidokert
 
Posts: 3
Joined: 30 Oct 2008, 13:49
Location: Estonia

Re: XML Pull parser and others

Postby alex » 31 Oct 2008, 17:01

> Is anyone working on something similar already or should i try a hand of either wrapping guththila for Poco or do a clean C++ rewrite, fashioned after LLamaXML and using Poco primitives ?

A clean rewrite as you proposed would be a way to go.

^> Another tidbit : code profiling. In quite a few instances i have needed a selective code profiling utility, that is present also in deployed code, just to get feedback on how it is performing in different environments.

...

> Again, i could try rework it for Poco, or is there something out there already ?^

If you want SVN write access to upload your code to the sandbox so everyone can see it and we can comment on it, email me at(aleskx, dot(gmail, com)).

> I also have a question on Poco exceptions, why are they all derived from std exception rather than std runtime_error ? just curious, i have been using the latter as base for my own exception trees.

I believe the reason is because exceptions are not necessarily errors, but Guenter would be the one to explain why he chose the actual exception hierarchy design.
alex
 
Posts: 1048
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Re: XML Pull parser and others

Postby kaidokert » 06 Nov 2008, 13:25

Ill try a hand at rewriting the pull parser then when i get around to it, meanwhile i found another pull parser within Platinum libraries
http://pt-framework.sourceforge.net/classPt_1_1Xml_1_1XmlReader.html

Ill dig out and polish my profiler code a bit and then put it up to poke at as well.
kaidokert
 
Posts: 3
Joined: 30 Oct 2008, 13:49
Location: Estonia


Return to Wishlist

Who is online

Users browsing this forum: No registered users and 1 guest