I want the program to display the text of the song on the couplets well, like this:

line1 line2

line3 line4

What is the best way to put such text into the database, so that it is easier to format it later? SQLite DB

    1 answer 1

    This is a typical task to write your markup language. XML is ideal, like:

    <song> <title>Пусть всегда будет солнце</title> <couplet> <verse>Солнечный круг</verse> <verse>Небо вокруг</verse> </couplet> </song> 

    I agree that it is redundant. But what if you decide to add notes to it? Then it will not be redundant.

    Another option (cheap) is to end the lines with \n and recognize this as the end of a stanza / verse, etc.

    • did so. added \ n to the end, but thought someone would suggest a better solution. Thanks :) - Jason Statham
    • And why not like XML? - Barmaley
    • c xml in android never worked. I'm a newbie. With json I can only work a little. - Jason Statham
    • Interested in adding notes. @Barmaley How can this be implemented? - KeyJoo
    • And yet the process of entering the song text in the database is not clear. - KeyJoo