Any interest in another xml parser?

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Any interest in another xml parser?

Postby jays » Tue Apr 27, 2010 23:12

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/
-- Doctor Doctor, it hurts when I ....

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Any interest in another xml parser?

Postby CrazyEddie » Wed Apr 28, 2010 13:53

Cool. As far as I recall this is the first time I ever heard of RapidXML ;)

CE.

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Re: Any interest in another xml parser?

Postby jays » Wed Apr 28, 2010 17:55

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.
-- Doctor Doctor, it hurts when I ....

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Any interest in another xml parser?

Postby CrazyEddie » Wed Apr 28, 2010 18:08

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.

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Any interest in another xml parser?

Postby Jamarr » Wed Apr 28, 2010 18:45

Looks impressive. I'm using TinyXML right now, but maybe I'll try this out ;)
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Re: Any interest in another xml parser?

Postby jays » Wed Apr 28, 2010 19:04

Jamarr wrote:Looks impressive. I'm using TinyXML right now, but maybe I'll try this out ;)

I thought so too.
-- Doctor Doctor, it hurts when I ....

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Re: Any interest in another xml parser?

Postby jays » Wed Apr 28, 2010 19:05

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.
-- Doctor Doctor, it hurts when I ....

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Any interest in another xml parser?

Postby CrazyEddie » Thu Apr 29, 2010 09:21

Great! I'll look at it some time soon :)

Thanks,

CE.

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Re: Any interest in another xml parser?

Postby jays » Fri Jun 04, 2010 23:11

I've found some bugs in the code. I'll send them in when I have the fixed version
-- Doctor Doctor, it hurts when I ....

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Any interest in another xml parser?

Postby CrazyEddie » Sat Jun 05, 2010 05:34

Ok, cool :)

CE

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Re: Any interest in another xml parser?

Postby jays » Mon Jun 07, 2010 14:57

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... :(
-- Doctor Doctor, it hurts when I ....

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Re: Any interest in another xml parser?

Postby jays » Mon Jun 28, 2010 17:57

My idea that this particular bug was present are incorrect. Thanks for your patience. It's been a busy summer.
-- Doctor Doctor, it hurts when I ....

User avatar
jacmoe
Just can't stay away
Just can't stay away
Posts: 136
Joined: Sun Apr 03, 2005 14:18
Location: Holbaek, Denmark
Contact:

Re: Any interest in another xml parser?

Postby jacmoe » Tue Jun 29, 2010 17:24

RapidXML is not relatively new - well, that's relative all by itself! :mrgreen:
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). :)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Any interest in another xml parser?

Postby CrazyEddie » Thu Jul 01, 2010 08:59

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.

jays
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Apr 26, 2010 23:47

Re: Any interest in another xml parser?

Postby jays » Tue Jul 06, 2010 20:03

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.
-- Doctor Doctor, it hurts when I ....


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 14 guests