Introduction
FictionBook is an XML ebook format created in Russia in the early 2000s and widely
used in Russian-speaking countries. A book is a single XML file that describes its
structure, such as sections, titles, poems and epigraphs, rather than its appearance,
leaving the layout to the reading program. Files are often distributed compressed as
.fb2.zip.
Structure
An FB2 file is XML with the root element
FictionBook in the namespace
http://www.gribuser.ru/xml/fictionbook/2.0. The
description element holds the title, authors, genre, language and
publishing details; one or more body elements hold the text as nested
section elements with titles and paragraphs; and binary
elements hold the cover and other images, encoded in Base64 and referred to by their
ID.
<?xml version="1.0" encoding="UTF-8"?>
<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0"
xmlns:l="http://www.w3.org/1999/xlink">
<description>
<title-info>
<book-title>A Short Story</book-title>
<lang>en</lang>
</title-info>
</description>
<body>
<section>
<title><p>Chapter 1</p></title>
<p>It began on a Tuesday.</p>
</section>
</body>
</FictionBook>
Links
Software
- FBReader (Windows, macOS, Linux, Android, iOS)
- calibre (Windows, macOS, Linux)
- KOReader (e-readers, Android, Linux)
- SumatraPDF (Windows)