FCPXMLCodable 0.5.0

FCPXMLCodable 0.5.0

Maintained by Todd Kramer.



  • By
  • Todd Kramer

FCPXMLCodable

CocoaPods Version Swift Platform

Overview

FCPXMLCodable is a Swift framework for working with FCPXML, providing type-safe conversion using Codable.

Documentation

Available here.

Features

  • Type-safe conversion of FCPXML documents to and from Swift
  • Create JSON and Property List representations of FCPXML documents or individual elements
  • Supports FCPXML 1.7 and later
  • DTD Validation (macOS only)

Usage

Convert To Swift

do {
    let document = try FCPXMLConverter.fcpxmlDocument(from: xmlString)
    print(document)
} catch let error {
    print(error)
}

Convert To XML String (all platforms)

do {
    let xmlString = try FCPXMLConverter.xmlString(from: document)
    print(xmlString)
} catch let error {
    print(error)
}

Convert To XML Document And Validate (macOS only)

do {
    let xmlDocument = try FCPXMLConverter.xmlDocument(from: document)
    print(xmlDocument.xmlString)
    try xmlDocument.validateFCPXML()
} catch let error {
    print(error)
}

Author

Todd Kramer