Page 1 of 2
Any interest in another xml parser?
Posted: Tue Apr 27, 2010 23:12
by jays
I'm building CEGUI (for Linux and Windows under gcc/NetBeans IDE) my own project but wanted to use RapidXML for it.
I've got the code done for using it in CEGUI. If there's any interest I'll post it. Perhaps someone can help me test it?
Here's the blurb about the RapidXML project:
"RapidXml is an attempt to create the fastest XML parser possible, while retaining useability, portability and reasonable W3C compatibility. It is an in-situ parser written in modern C++, with parsing speed approaching that of strlen function executed on the same data.
RapidXml has been around since 2006, and is being used by lots of people. HTC uses it in some of its mobile phones.
If you are looking for a stable and fast parser, look no further. Integration with your project will be trivial, because entire library is contained in a single header file, and requires no building or configuration. "
http://rapidxml.sourceforge.net/
Re: Any interest in another xml parser?
Posted: Wed Apr 28, 2010 13:53
by CrazyEddie
Cool. As far as I recall this is the first time I ever heard of RapidXML
CE.
Re: Any interest in another xml parser?
Posted: Wed Apr 28, 2010 17:55
by jays
It seems to be reasonably new.
How do you want me to submit the changes? Post them here or go through the normal submission process?
It won't affect anything here but I did want to check one thing.
All the code for the parser is in a template in a .h file.
I need to see if the compiler(s) are smart enough to only keep only one copy of the code if it uses c++ templates to create it. It would really be wasteful to duplicate code if the parser were used multiple places within a project.
Re: Any interest in another xml parser?
Posted: Wed Apr 28, 2010 18:08
by CrazyEddie
With regards to where to submit, I think adding it to
http://mantis.cegui.org.uk is the way to go. Firstly because you can upload attachments, and secondly because otherwise it will get lost and forgotten about
CE.
Re: Any interest in another xml parser?
Posted: Wed Apr 28, 2010 18:45
by Jamarr
Looks impressive. I'm using TinyXML right now, but maybe I'll try this out
Re: Any interest in another xml parser?
Posted: Wed Apr 28, 2010 19:04
by jays
Jamarr wrote:Looks impressive. I'm using TinyXML right now, but maybe I'll try this out
I thought so too.
Re: Any interest in another xml parser?
Posted: Wed Apr 28, 2010 19:05
by jays
CrazyEddie wrote:With regards to where to submit, I think adding it to
http://mantis.cegui.org.uk is the way to go. Firstly because you can upload attachments, and secondly because otherwise it will get lost and forgotten about
CE.
Done. I'm still in the process of building cegui for my project so I have not done much testing yet.
I'd be happy to help with it if needed.
Re: Any interest in another xml parser?
Posted: Thu Apr 29, 2010 09:21
by CrazyEddie
Great! I'll look at it some time soon
Thanks,
CE.
Re: Any interest in another xml parser?
Posted: Fri Jun 04, 2010 23:11
by jays
I've found some bugs in the code. I'll send them in when I have the fixed version
Re: Any interest in another xml parser?
Posted: Sat Jun 05, 2010 05:34
by CrazyEddie
Ok, cool
CE
Re: Any interest in another xml parser?
Posted: Mon Jun 07, 2010 14:57
by jays
The rapidxml parser gets it's speed from doing in place parsing. I.E. It avoids a lot of memory copying and only keeps one copy of the data. I want to make sure the cegui xml node handlers make their own copies of the data from the xml file before I delete the buffer that contains them. If they don't they'll be reading deleted objects...
Re: Any interest in another xml parser?
Posted: Mon Jun 28, 2010 17:57
by jays
My idea that this particular bug was present are incorrect. Thanks for your patience. It's been a busy summer.
Re: Any interest in another xml parser?
Posted: Tue Jun 29, 2010 17:24
by jacmoe
RapidXML is not relatively new - well, that's relative all by itself!
It's the default parser for Boost.PropertyTree - and has existed since 2006 - so I think it has rounded off most of the rough edges.
What's beautiful is that you can get away with using only the rapid_xml header, nothing else.
It does in-situ parsing, and absolutely no checking at all.
It's bare-bones, and thus not for everyone.
I tried turning it on, but it's not ready yet, I gather?
I am looking forward to it when it works as it's truly lightweight (it doesn't get more lightweight than that).
Re: Any interest in another xml parser?
Posted: Thu Jul 01, 2010 08:59
by CrazyEddie
Hmmm. Should be working
We're not including RapidXML itself in the codebase, but you should just have to point the config.lua to the right place. I.e, this bit:
Code: Select all
-- Set this to where your RapidXML package headers are to be found
RAPIDXML_PATHS = { "rapidxml-1.13", "", "" }
If it's not working for you, it may be a bug or something, so further details / error messages would help to track that down
CE.
Re: Any interest in another xml parser?
Posted: Tue Jul 06, 2010 20:03
by jays
I was afraid there was a reference to freed memory but I couldn't find any problems.
If it helps any I've had no issues with the code not parsing xml.