Create or parse CoreData managed object model XMLs

Overview

License Platform Carthage compatible Swift Package Manager compatible Build Status

MomXML

Create or parse CoreData managed object model XMLs.

Project description

Model

Contains struct objects which describe each XML elements.

var momXML = MomXML()
let entityStatus = MomEntity(name: "Status")
momXML.model.entities.append(entityStatus)
let elementStatus = MomElement(name: "Status")
momXML.model.elements.append(elementStatus)

Equatable

Contains extensions to make model objects Equatable.

ToXML

Contains struct extensions to create XML string from struct objects.

let string = momXML.xml

FromXML

Contains struct extensions to create this struct objects using XML from SWXMLHash frameworks.

let xmlString = ... // from file or string
let mom = MomXML(xml: SWXMLHash.parse(xmlString))

FromCoreData

Contains CoreData extensions to create struct objects.

let manageObjectModel: NSManagegObjectModel = ...
let mom: MomXML = manageObjectModel.mom

So you can serialize in memory data model into xml.

ToCoreData

Contains struct extensions to create core data objects.

let mom: MomXML = ..
let manageObjectModel: NSManagegObjectModel = mom.coreData

Setup

Using Carthage

Carthage is a decentralized dependency manager for Objective-C and Swift.

Add the project to your Cartfile.

github "phimage/MomXML"

Run carthage update and follow the additional steps in order to add MomXML to your project.

Using Cocoapod

Add the project to your Podfile to get Model/Equatable/ToXML.

pod "MomXML"

For only Model.

pod "MomXML/Model"

There is many subspec to get only the code you want.

For all about XMLs.

pod "MomXML/XML"

For all about core data.

pod "MomXML/CoreData"

Limitations

  • Abstract classes
  • ...

Develop

Download dependencies

Execute

carthage update --platform osx

TODO

  • ToCoreData is only partially implemented
  • Unit Tests on FromCoreData and ToCoreData

Contribute

  • Fork
  • Make PR
You might also like...
Arrow  🏹 Parse JSON with style
Arrow 🏹 Parse JSON with style

Arrow 🏹 Parse JSON with style

SwiftDate 🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.
SwiftDate 🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.

Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift. What's This? SwiftDate is the definitive toolchain to ma

An instagram clone for iOS built with Parse
An instagram clone for iOS built with Parse

Parstagram - Part II This is an Instagram clone with a custom Parse backend that allows a user to post photos, view a global photos feed, and add comm

This is an Instagram clone with a custom Parse backend that allows a user to post photos, view a global photos feed, and add comments!
This is an Instagram clone with a custom Parse backend that allows a user to post photos, view a global photos feed, and add comments!

Parstagram - Part II This is an Instagram clone with a custom Parse backend that allows a user to post photos, view a global photos feed, and add comm

Twitter Text Libraries. This code is used at Twitter to tokenize and parse text to meet the expectations for what can be used on the platform.

twitter-text This repository is a collection of libraries and conformance tests to standardize parsing of Tweet text. It synchronizes development, tes

Parse iOS mobile provisioning files into Swift models

SwiftyProvisioningProfile This library provides a way to decode a .mobileprovision file into a Swift model. Installation The recommended installation

A utility used to parse number strings

NumberParser is a Swift package used to parse number strings, e.g. "eight thousa

Setup your class structure in Xcode Interface Builder and save() in Parse Server.
Setup your class structure in Xcode Interface Builder and save() in Parse Server.

ISParseBind With ISParseBind you can save, update and query PFObjects using the power of Xcode Interface Builder resources. https://www.youtube.com/wa

Parse JSON like a badass

Parse JSON like a badass Full disclaimer regarding performance For production apps (or if you care about efficiency at all), I highly recommend using

 Layer + Parse iOS Example (Swift)
Layer + Parse iOS Example (Swift)

Note: I no longer actively working on this project. If you encounter any problem, please open an issue and hopefully the community will help out. If y

LDOMarkdownParser - Parse (some) markdown attributes into an NSAttributedString

LDOMarkdownParser Description Convert markdown text styling into an NSAttributed

A command line tool to parse pricing from a pdf and generate an updated csv file for House Call Pro

A command line tool to parse pricing from a pdf and generate an updated csv file for House Call Pro

Fetch a XML feed and parse it into objects

AlamofireXmlToObjects 🚨 This is now a subspec of EVReflection and the code is maintained there. 🚨 You can install it as a subspec like this: use_fra

A library for Search & Parse the weather data from Wunderground & Openweathermap conveniently.
A library for Search & Parse the weather data from Wunderground & Openweathermap conveniently.

SmileWeather A library for Search & Parse the weather data from Wunderground & Openweathermap conveniently. #What can it do for you? 1. Handle all com

Decodable Simple and strict, yet powerful object mapping made possible by Swift 2's error handling.

Decodable Simple and strict, yet powerful object mapping made possible by Swift 2's error handling. Greatly inspired by Argo, but without a bizillion

Reflection based (Dictionary, CKRecord, NSManagedObject, Realm, JSON and XML) object mapping with extensions for Alamofire and Moya with RxSwift or ReactiveSwift

EVReflection General information At this moment the master branch is tested with Swift 4.2 and 5.0 beta If you want to continue using EVReflection in

CRUD is an object-relational mapping (ORM) system for Swift 4+.

CRUD is an object-relational mapping (ORM) system for Swift 4+. CRUD takes Swift 4 Codable types and maps them to SQL database tables. CRUD can create tables based on Codable types and perform inserts and updates of objects in those tables. CRUD can also perform selects and joins of tables, all in a type-safe manner.

URLEmbeddedView automatically caches the object that is confirmed the Open Graph Protocol.
URLEmbeddedView automatically caches the object that is confirmed the Open Graph Protocol.

URLEmbeddedView Features Simple interface for fetching Open Graph Data Be able to display Open Graph Data Automatically caching Open Graph Data Automa

A Swift extension that adds toast notifications to the UIView object class.
A Swift extension that adds toast notifications to the UIView object class.

Toast-Swift Toast-Swift is a Swift extension that adds toast notifications to the UIView object class. It is intended to be simple, lightweight, and e

Comments
  • Fix/relationship

    Fix/relationship

    • CoreData builder now gets correct relationship destination and inverse
    • adding unit test for CoreData relationships
    • missing name in CoreData relationship
    opened by quentinmarciset 0
Releases(1.2.0)
Owner
Eric Marchand
🧙🍺🥊🥋🏓
Eric Marchand
Securely synchronize any CareKit 2.1+ based app to a Parse Server Cloud. Compatible with parse-hipaa.

ParseCareKit Use at your own risk. There is no promise that this is HIPAA compliant and we are not responsible for any mishandling of your data This f

Network Reconnaissance Lab 31 Nov 24, 2022
A fast, convenient and nonintrusive conversion framework between JSON and model. Your model class doesn't need to extend any base class. You don't need to modify any model file.

MJExtension A fast, convenient and nonintrusive conversion framework between JSON and model. 转换速度快、使用简单方便的字典转模型框架 ?? ✍??Release Notes: more details Co

M了个J 8.5k Jan 3, 2023
SwiftUIDay49To61 - Includes CoreData, Networking learning and my custom MVVM CoreData implementation from 100 days of SwiftUI

Includes CoreData, Networking learning and my custom MVVM CoreData implementation from 100 days of SwiftUI by "Hacking with Swift"

Vong Nyuk Soon 3 Feb 11, 2022
Arctanyn 0 Dec 24, 2022
Fully automatic managed circular image array above UIKit.

Automatic Profile cluster view Fully automatic managed circular image array. Usage From Interface Builder • Drag ProfileClusterView.swift file into yo

Chandan Karmakar 5 Dec 9, 2022
IrohaCrypto - This repository is managed by Terraform!

IrohaCrypto Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements Installation IrohaC

ソラミツ 0 Dec 23, 2021
SwiftyCache is a dynamic and auto-managed cache written in Swift

SwiftyCache is a dynamic and auto-managed cache written in Swift. Unlike a simple cache system, it allows you to keep some data even in different executions. Guaranteeing persistence, when desired, without increasing the time required to save or recover data.

Antonio Guerra 3 Aug 28, 2022
Dogtector: dog breed detection app for iOS using YOLOv5 model combined with Metal based object decoder optimized

Dogtector Project description Dogtector is dog breed detection app for iOS using YOLOv5 model combined with Metal based object decoder optimized for u

Bartłomiej Pluta 21 Aug 1, 2022
CoreMLSample - CoreML Example for in app model and download model

CoreMLSample Sample for CoreML This project is CoreML Example for in app model a

Kim Seonghun 2 Aug 31, 2022
Annotation - Generate files to train with Object Detection by Create ML

CreateML Annotation Generate files to train with Object Detection by Create ML.

Vaida 10 Nov 7, 2022