FCPXMLConverter
public struct FCPXMLConverter
Undocumented
-
Converts an XML string to a FCPXMLDocument value.
Declaration
Swift
public static func fcpxmlDocument(from xmlString: String) throws -> FCPXMLDocument
Parameters
xmlString
The XML string to be converted.
-
Converts a FCPXMLDocument value to a XML string.
Declaration
Swift
public static func xmlString(from fcpxmlDocument: FCPXMLDocument) throws -> String
Parameters
fcpxmlDocument
The FCPXMLDocument to be converted.
-
A generic function for decoding a FCPXML element from a valid XML string.
Declaration
Swift
public static func decode<T>(_ type: T.Type, from xmlString: String) throws -> T where T : Decodable
Parameters
type
The type that represents the XML element in Swift.
xmlString
The XML string to be decoded.
-
A generic function that converts a FCPXML element from its Swift representation to a XML string.
Declaration
Swift
public static func xmlString<T>(from fcpxmlElement: T, rootKey: String) throws -> String where T : Encodable
Parameters
fcpxmlElement
The FCPXML element to be converted.
rootKey
The XML root key to use for the FCPXML element.
-
Converts a FCPXMLDocument to a XMLDocument. The returned XMLDocument uses an empty DTD so that its string representation does not include the full FCPXML DTD. For validation use the
validateFCPXML
method included as an extension on XMLDocument.Declaration
Swift
public static func xmlDocument(from fcpxmlDocument: FCPXMLDocument) throws -> XMLDocument
Parameters
fcpxmlDocument
<#fcpxmlDocument description#>