Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 1.21 KB

README.md

File metadata and controls

58 lines (42 loc) · 1.21 KB

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