FCPXMLCodable is a Swift framework for working with FCPXML, providing type-safe conversion using Codable.
Available here.
- 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)
do {
let document = try FCPXMLConverter.fcpxmlDocument(from: xmlString)
print(document)
} catch let error {
print(error)
}
do {
let xmlString = try FCPXMLConverter.xmlString(from: document)
print(xmlString)
} catch let error {
print(error)
}
do {
let xmlDocument = try FCPXMLConverter.xmlDocument(from: document)
print(xmlDocument.xmlString)
try xmlDocument.validateFCPXML()
} catch let error {
print(error)
}