View Full Version : converting an XML file (making a dictionary)


meehrcat
03-01-2011, 02:33 PM
hey, i'm still new to this, so apologies if this is in the wrong place. Is there anyone who can advise on how i can go about converting an XML file to something readable by the Kindle? Done a bit of looking online but not found anything superhelpful yet. Appreciate any advice - more info here:

I was looking for a Swedish-English dictionary to use with my Kindle, but can't find one... So was wondering if i could make one from the open content at:

http://lexin.nada.kth.se/sve-eng.html

Where it's possible to download the whole thing as an XML file - which looks like this (as an example):

<word value="abaft" lang="en" class="ab"> <translation value="akter ut"/> </word>
<word value="abaft" lang="en" class="pp"> <translation value="akter om" comment="sjöterm"/> </word>
<word value="abandoned" lang="en" class="jj"> <translation value="lössläppt"/> <translation value="otyglad"/> <translation value="utsvävande"/> <translation value="fördärvad"/> <example value="otyglat beteende"> <translation value="abandoned behaviour"/> </example> </word>

susan_cassidy
03-01-2011, 02:39 PM
Have you seen the "Indexes and Dictionaries" section under http://www.mobipocket.com/dev/article.asp?BaseFolder=prcgen?

You might be able to use XSLT to write a conversion, if you are good at XSLT (which is kind of a pain). Or, you might have to parse out the XML, then output the appropriate HTML for conversion. Perl has several goog XML parsers (I like XML::Twig).

Mick_Belgium
06-13-2011, 10:32 AM
Hey Meehrcat, have you come up with something in the meantime? I'm looking for a SWE-EN dictionary for my Kindle, too. Thanks in advance!