Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaranowski committed Jun 27, 2013
1 parent 8bd165e commit 2a35c70
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
@@ -1,11 +1,21 @@
# Mantle XML Adapter

This repository is a fork of the excellent [Mantle](https://github.com/github/Mantle) library that adds a MTLXMLAdapter class and some XML specific NSValueTransformer utility functions. This allows you to use XML data to create Mantle model objects in a similiar way to you would with the built in JSON support.
This repository started as a fork of the excellent [Mantle](https://github.com/github/Mantle) framework and added a MTLXMLAdapter and some XML specific NSValueTransformer utility functions. This allows you to use XML data to create Mantle model instances in addition to the builtin JSON support.

This is mean to be used as [Cocoapod](http://cocoapods.org) that pulls in just the XML specific implementation files, and has Mantle and KISSXML as a dependency.
The new additions can be found in these files:
* [MTLXMLAdapter.h](https://github.com/mbaranowski/MantleXMLAdapter/blob/master/Mantle/MTLXMLAdapter.h)
* [MTLXMLAdapter.m](https://github.com/mbaranowski/MantleXMLAdapter/blob/master/Mantle/MTLXMLAdapter.m)
* [NSValueTransformer+MTLXMLTransformerAdditions.h](https://github.com/mbaranowski/MantleXMLAdapter/blob/master/Mantle/NSValueTransformer%2BMTLXMLTransformerAdditions.h)
* [NSValueTransformer+MTLXMLTransformerAdditions.m](https://github.com/mbaranowski/MantleXMLAdapter/blob/master/Mantle/NSValueTransformer%2BMTLXMLTransformerAdditions.m)

There is very basic support for serializing Mantle model instances into XML, provided that the user manually constructs the DDXMLElement node tree from an instance.
This is best used a [Cocoapod](http://cocoapods.org) that pulls in just the files above, and has Mantle and KISSXML as a dependency.

There is very basic support for serializing Mantle model instances into XML, provided that the user manually constructs the DDXMLElement node tree by implementing serializeToXMLElement. Some examples of current usage can be found in these test files:

* [MTLTestModelXML.h](https://github.com/mbaranowski/MantleXMLAdapter/blob/master/MantleTests/MTLTestModelXML.h)
* [MTLTestModelXML.m](https://github.com/mbaranowski/MantleXMLAdapter/blob/master/MantleTests/MTLTestModelXML.m)
* [MTLXMLAdapterSpec.m](https://github.com/mbaranowski/MantleXMLAdapter/blob/master/MantleTests/MTLXMLAdapterSpec.m)

## License

Mantle XML Adapter is released under the MIT license, like Mantle itself, See
Expand Down

0 comments on commit 2a35c70

Please sign in to comment.