View Single Post
Old 03-20-2009, 09:18 PM   #7
jbruce
Connoisseur
jbruce has learned how to buy an e-book online
 
Posts: 64
Karma: 88
Join Date: Mar 2009
Device: Sony PRS 700
No worries WDE - didn't think it was argumentative. Figured we weren't on the "same page" - so to speak.

From looking at the XML files - it looks like Sony is still figuring out how to go from a standard table database, to an XML based structure (it does take some getting used to). Reminds me of the iTunes library XML prior to version 7.

Hopefully they'll clean it up in due time.

Code:
I would do something roughly like this (some fields may have been omitted for space concerns):

<books>
    <book>
        <id>##</id>
        <title>20,000 Leagues Under the See</title>
        <author>Jules Vern</author>
        <author_sort>Vern,Jules</author_sort>
        <publisher>######</publisher>
        <pub_date>####/##/##</pub_date>
        <current_page>#####</current_page>
        <font_size>###</font_size>
        <cover>####</cover>
    </book>
</books>
<collections>
    <collection>
        <id>##</id>
        <title>####</title>
        <order_by>####</order_by>
        <books>##,##,##,##,##</books>
    <collection>
</collections>
<bookmarks>
    <bookmark>
        <id>##</id>
        <date>####/##/##</date>
        <content>####</content>
        ...there a lot of fields for this section...
    </bookmark>
</bookmarks>
Each wrapper would be a "table." Each element would be a "column." (If thinking of it like a normal SQL database.)

Could be three separate XML files; or, I would probably go with 2: (1) for books and bookmarks, (2) for collections. Then, if the "books" tag in the collections.xml file is empty - delete the collection automatically. Or, notify the user on the home screen they have an empty collection: Delete y/n?

Again, just a thought.

But, maybe there is a logical explanation for why there are: 2 XML files in the cache folder; 1 for every book a user has opened, at least once, in the layout folder; and, 2 more in the sync folder.

Hopefully, the ability to remove a collection will be coming down the pipe. (Would also enjoy the ability to add a book to a collection while reading it.)

Cheers,
J

ps. If these same XML layouts are then used with the Sony sync software - it could be detected when there are more books in the "playlist" than on the reader - and automatic syncing could be instantiated.

Last edited by jbruce; 03-20-2009 at 10:00 PM. Reason: added ps + edit xml
jbruce is offline   Reply With Quote