8000 Look into replacing RapidXML · Issue #83 · USCiLab/cereal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Look into replacing RapidXML #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and conta 8000 ct its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AzothAmmo opened this issue Mar 24, 2014 · 8 comments
Open

Look into replacing RapidXML #83

AzothAmmo opened this issue Mar 24, 2014 · 8 comments
Milestone

Comments

@AzothAmmo
Copy link
Contributor

As pointed out on the /r/cpp thread, RapidXML is no longer being actively supported, and PugiXML looks like a good candidate for replacement. Seems to have a cleaner interface too.

@AzothAmmo AzothAmmo added this to the v1.1.0 milestone Mar 24, 2014
@AzothAmmo AzothAmmo changed the title Look into replacing RapidXML with PugiXML Look into replacing RapidXML Apr 17, 2014
@AzothAmmo
Copy link
Contributor Author

With the discussion about streaming support PugiXML may not be the best choice - it certainly seems like a great choice for a DOM like model, but it wouldn't support streaming.

We can either provide a single XML archive that supports streaming or have separate streaming and non-streaming versions. Either way, this leads to the issue of finding a suitable XML library to perform streaming serialization. It'd be very preferable if we didn't have to write something from the ground up since it seems like both a lot of work and something prone to introducing errors.

@amc522
Copy link
amc522 commented Apr 17, 2014

Why not libxml (http://xmlsoft.org/) or tinyxml2 (https://github.com/leethomason/tinyxml2). Both are robust xml parsers and writers that support streaming. Just some food for thought.

@tarqd
Copy link
tarqd commented Apr 18, 2014

Really for cereal's use-case having to store the a full representation (be it DOM or JSON) seems unnecessary, we really only need it to keep objects in memory long enough to deserialize them. Better for security too (we don't waste resources on potentially large invalid objects). Not that cereal should be exposed to user input just yet but it's good to keep it in mind for the future.

Plus streaming is actually simpler as the parser doesn't need to worry about how to represent relations between nodes as much, it just emits events in order and let's the listener take care of it. Of course most users want a full DOM if they are directly interacting with the input but cereal users aren't

@AzothAmmo
Copy link
Contributor Author

I like the idea of incorporating a common core of text parsing into cereal that could be used to create both a streaming XML and streaming JSON archive. There's a lot we don't need to handle since we have a fairly restrictive structure (and all we need to do is ignore things that we can't read anyway when parsing).

I'm going to push this issue for a later release than 1.1 since it will be a decent amount of work and let 1.1 be more of a minor feature and bug fix release.

@AzothAmmo AzothAmmo modified the milestones: v2.0.0, v1.1.0 Apr 18, 2014
@tarqd
Copy link
tarqd commented May 21, 2014

Another option: http://isocpp.org/blog/2014/05/libstudxml

@patlecat
Copy link
patlecat commented Jul 2, 2014

Since Milo has revived his RapidJson project which really is very fast it would be nice to see him support XML in the same way in his lib now too!

@Devacor
Copy link
Devacor commented Jul 2, 2014

I'm a fan of this discussion, but if a hand-rolled solution is picked, I'd really like the performance to be priority. Too many json parsers are unacceptably slow when scaling to load save game information (like 500 kb of text). RapidJson is pretty solid for performance though!

I know this is a discussion of XML, but if Json is also taken on just wanted to get this sentiment in.

@patlecat
Copy link
patlecat commented Jul 8, 2014

Actually Milo supports my idea of having his lib read both JSON and XML. He might work on this after v1.0 of RapidJSON is out, which shouldn't be long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0