Skip to content

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

Notifications You must be signed in to change notification settings

toddkramer/FCPXMLCodable

Repository files navigation

FCPXMLCodable

Swift

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published