XMLTV

0.1.1

Use EPG (XMLTV) files in your project
Rubenfer/XMLTV

What's New

XMLTV 0.1.1

2020-02-08T09:36:15Z

XMLTV

XMLTV is a Swift package which allows you to parse XML files using the EPG XMLTV structure.

Usage

Add XMLTV to your project using Swift Package Manager.

XMLTV provides two structs representing channels and programs.

public struct TVChannel {
    public let id: String
    public let name: String?
    public let url: String?
    public let icon: String?
}

public struct TVProgram {
    public let start: Date?
    public let stop: Date?
    public let channel: TVChannel
    public let title: String?
    public let description: String?
    public let credits: [String:String]
    public let date: String?
    public let categories: [String]
    public let country: String?
    public let episode: String?
    public let icon: String?
    public let rating: String?
}

To parse files, you need to create an XMLTV object using the file data. Then you can use getChannels() -> [TVChannel] and getPrograms(channel:) -> [TVProgram] to get the information.

Description

  • Swift Tools 5.1.0
View More Packages from this Author

Dependencies

Last updated: Sun Nov 01 2026 01:17:19 GMT-1000 (Hawaii-Aleutian Standard Time)