You are here:   Home Creating KVTML Files

dnrestcom -The simplest way to learn!

Just the simplest way to learn all the things.

Jan 02
2009

Creating KVTML Files

Posted by: dnrestcom

Tagged in: Programming , KVTML

KWordQuiz, KVocTrain, and other KDE-based programs use the KVTML file format for their data files. The format is just a fairly simple XML format but, unfortunately, there doesn't seem to be anything available to convert a text file to this format. So, once again, AWK to the rescue.

While I was extracting data from a fairly convoluted HTML file which required some more awk, the generic idea was to take some easy-to-make text format and build the needed KVTML file. I decided to use one line per record with a "|" as the field separator. There is nothing magic about using this character-you just need something that does not appear in the data itself.

My "knowledge" of the KVTML format comes from creating a file with KWordQuit and then taking a look at it. I don't really understand with rows and columns is used for but it doesn't seem important. Without further ado, here is the awk program.

Continue reading...

Trackback(0)
Comments (0)add
You must be logged in to post a comment. Please register if you do not have an account yet.

busy

 Subscribe!

Or enter your email address:

Info