ciao, mi trovo nella neccessità di simulare una struttura gerarchica di un file XML in un DB di sqlite, questo è un file di esmepio,utile solo per capirne la struttura :
codice:
<?xml version="1.0" encoding="utf-8"?>
<type>
    <input type="number_digit">
        <portrait>
            <touch_mask touch="1">
                <comment>PORTRAIT configuration 1 touch - SMALL  SCREEN [4in] - NUMBER</comment>
            </touch_mask>
            ... to 10 element
        </portrait>
        <landscape>
            <touch_mask touch="1">
                <comment>LANDSCAPE configuration 1 touch - SMALL  SCREEN [4in] - NUMBER</comment>
            </touch_mask>
            ... to 10 element
        </landscape>
    </input>
    <input type="text">
        <portrait>
            <touch_mask touch="1">
                <comment>PORTRAIT configuration 1 touch - SMALL  SCREEN [4in] - TEXT</comment>
            </touch_mask>
            ... to 10 element
        </portrait>
        <landscape>
            <touch_mask touch="1">
                <comment>LANDSCAPE configuration 1 touch - SMALL  SCREEN [4in] - TEXT</comment>
            </touch_mask>
            ... to 10 element
        </landscape>
    </input>
    <input type="phone">
        <portrait>
            <touch_mask touch="1">
                <comment>PORTRAIT configuration 1 touch - SMALL  SCREEN [4in] - </comment>
            </touch_mask>
            ... to 10 element
        </portrait>
        <landscape>
            <touch_mask touch="1">
                <comment>LANDSCAPE configuration 1 touch - SMALL  SCREEN [4in] - </comment>
            </touch_mask>
            ... to 10 element
        </landscape>
    </input>
    <input type="password">
        <portrait>
            <touch_mask touch="1">
                <comment>PORTRAIT configuration 1 touch - SMALL  SCREEN [4in] - PASSWORD</comment>
            </touch_mask>
            ... to 10 element
        </portrait>
        <landscape>
            <touch_mask touch="1">
                <comment>LANDSCAPE configuration 1 touch - SMALL  SCREEN [4in] - PASSWORD</comment>
            </touch_mask>
            ... to 10 element
        </landscape>
    </input>
    <input type="andress">
        <portrait>
            <touch_mask touch="1">
                <comment>PORTRAIT configuration 1 touch - SMALL  SCREEN [4in] - ANDRESS</comment>
            </touch_mask>
            ... to 10 element
        </portrait>
        <landscape>
            <touch_mask touch="1">
                <comment>LANDSCAPE configuration 1 touch - SMALL  SCREEN [4in] - ANDRESS</comment>
            </touch_mask>
            ... to 10 element
        </landscape>
    </input>
</type>
il problema è che non so esattamente come mi conviene organizzare il DB, creo una tabella per ogni tipo di oggetto e poi includo degli indici per i vari figli?
creo una tabella touch_mask, oggetto che desidero estrarre dal DB tramite query, con specificati al suo interno dei campi che mi determinano le carrateristiche descritte dai genitori(input type,landscape/portrait,touch number)?
voi come affrontereste questo problema? thx