Sample library.xml file

From OLPC
Revision as of 15:45, 17 July 2007 by Lauren (talk | contribs)
Jump to: navigation, search

Here is a sample library.xml file for a 2-book collection, "Curentos de Argentina":

<?xml version="1.0" encoding="ISO-8859-1"?>
<library name="Cuentos de Argentina">
	<entry url="argentina-pdfs/borges_elaleph.pdf">
		<title>El Aleph [PDF]</title>
		<author>Jorge Luis Borges</author>
		<language>Español</language>
		<date>1949</date>
		<publisher>Argentina</publisher>
		<icon>argentina-pdfs/borges_elaleph-thumb.svg</icon>
		<description>La candente mañana de febrero en que Beatriz Viterbo murió, después de una imperiosa agonía que no se rebajó un solo instante ni al sentimentalismo ni al miedo, noté que las carteleras de fierro de la Plaza Constitución habían renovado no sé qué aviso de cigarrillos rubios</description>
	</entry>
	<entry url="argentina-pdfs/BorgesJorgeLuis-LacasadelAsterion.pdf">
		<title>La Casa de Asterión [PDF]</title>
		<author>Jorge Luis Borges</author>
		<language>Español</language>
		<date>1949</date>
		<publisher>Argentina</publisher>
		<icon>BorgesJorgeLuis-LacasadelAsterion-thumb.svg</icon>
		<description>Sé que me acusan de soberia, y tal vez de misantropía, y tal vez de locura.  Tales acusaciones (que yo casticaré a su debido tiempo) son irrisorias.</description>
	</entry>
</library>

Elements and Attributes

The library.xml file contains the following elements and attributes:

<library name=""> 
library is the root element that defines the collection. name refers to the name of the collection-- in this case, "Cuentos de Argentina."
<entry url=""> 
The entry element contains the metadata for a single item in a collection. url refers to the url for that item.
title (optional)
The title element contains the item's title.
author (optional)
The author element contains the item's author.
language (optional)
The language element contains the item's language.
date (optional)
The date element contains the item's date of composition/creation or publication/release.
publisher (optional)
The publisher element contains the item's publisher.
icon (optional)
The icon element contains the filename of the thumbnail image that is displayed next to the item's library listing.
description (optional)
The description element contains the item's description.