FCPXMLDocument
@dynamicMemberLookup
public struct FCPXMLDocument : XMLRepresentable
An FCPXML document represents a Final Cut Pro X object. There are three supported object types, enumerated in FCPXMLDocument.Configuration.
-
The DTD version of the document,
1.8
by default.Declaration
Swift
public let version: String -
The import options to use for the document.
Declaration
Swift
public var importOptions: [ImportOption]? { get set } -
The resources referenced in the document.
Declaration
Swift
public var resources: Resources? -
The configuration of the document.
Declaration
Swift
public var configuration: Configuration { get } -
Initializes a new FCPXML document with its DTD version and configuration.
Declaration
Swift
public init(version: String = "1.8", configuration: Configuration, resources: Resources? = nil)Parameters
versionThe DTD version of the document.
configurationThe configuration of the document.
-
Enables dynamic member lookup of the document’s resources, including assets, formats, effects, and media.
Declaration
Swift
public subscript<T>(dynamicMember keyPath: KeyPath<Resources, T>) -> T? { get }
-
A FCPXML document can have one of three valid configurations: a library, a set of events, or a set of event items (including clips, projects, keywords, and smart collections).
Declaration
Swift
public enum Configuration
-
Adds an import option specifying whether assets referenced in the imported XML should be copied or linked.
Declaration
Swift
public mutating func setShouldCopyAssetsOnImport(_ shouldCopyAssets: Bool)Parameters
shouldCopyAssetsA Boolean value indicating whether assets should be copied (
true) or linked (false). -
Adds an import option specifying whether or not warnings generated during import into FCPX should be suppressed.
Declaration
Swift
public mutating func setShouldSuppressWarningsOnImport(_ shouldSuppressWarnings: Bool)Parameters
shouldSuppressWarningsA Boolean value indicating whether or not warnings should be suppressed.
-
Adds an import option specifying the location of the library into which events and projects should be imported.
Declaration
Swift
public mutating func setLibraryLocationForImport(_ location: String)Parameters
locationThe file URL of the library location. If the specified URL represents a directory, the default library name is used. If no library exists at the location specified, a new library is created.
FCPXMLDocument Structure Reference