You are here:   Home Tags KVTML

dnrestcom -The simplest way to learn!

Just the simplest way to learn all the things.
Tags >> KVTML
Jan 02
2009

Creating KVTML Files

Posted by dnrestcom in Programming , KVTML

User Rating: / 0
PoorBest 
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...

 Subscribe!

Or enter your email address:

Info