Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact 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

Implemented basic XmlImporter functionality #2380

Merged
merged 4 commits into from
Apr 23, 2014

Conversation

JamesLupiani
Copy link
Contributor

This covers much of the basic XmlImporter functionality. It supports reading from XML into any custom data type it can find in loaded assemblies. It supports all the integral types, generic collections, and the efficient array format for integers, vectors. It also handles polymorphic types and explicit type specifications for elements.

Also included are XML test data and corresponding classes I've been using to debug it. They're straight out of Sean Hargreaves' Everything you ever wanted to know about IntermediateSerializer. No unit tests yet, but it's a step towards it.

Stuff I haven't implemented yet:

  • Custom names for elements
  • Flattened content for nested classes
  • Shared resources
  • External references
  • Error checking for elements that are required to be null

Nothing too tough to do, I just ran out of time for now. Later passes can finish off these features. Additionally, if someone needs the IntermediateSerializer, they can refactor this code and create the writing end of it pretty easily.

Note that MonoGame doesn't currently have a ReflectiveWriter so AFAIK custom types will need a ContentTypeWriter defined.

@tomspilman
Copy link
Member

Looks good!

tomspilman added a commit that referenced this pull request Apr 23, 2014
Implemented basic XmlImporter functionality
@tomspilman tomspilman merged commit f64b702 into MonoGame:develop Apr 23, 2014
@JamesLupiani JamesLupiani deleted the XmlImporter branch May 28, 2014 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants