ResourceUtil

Factory helpers for creating Resource instances and parsing them as XML.

Functions

Link copied to clipboard

Creates a Resource for the given EPUB-relative href, with the given bytes.

fun createResource(title: String, href: String): Resource

Creates a resource with as contents an HTML page with the given title.

Link copied to clipboard
fun getAsDocument(resource: Resource): Document

Reads & parses the given resource as an XML Document.