このデータテーブルをXMLに変換する方法

There are two data tables which contains the information about file directory structure. I just wanted to convert this to xml which should best for fast & efficient parsing.

enter image description here

in table-1, client is the root directory & project is the folder Name inside the client (root directory) and there can be one or many folders inside of root directory (client).

e.g. D:\C1\P1\  /* here D:\ is the local disk */
     D:\C1\P2\ 

in table-2, it tells about the files inside of concered root directory (client) & folder (project) and there can be many files inside of one folder.

e.g. D:\C1\P1\F1  /* F1 is the file name */  

Following is the sample xml for Client(C1), Project (P1) & existing files (F1 & F2). please take a look and if it can define the better way please correct.


     
          C1
          
              P1
              
                 F1
                 F2
               
           
     
 

*Note : * I am using jaxb to marshall & unmarshall the xml file.

0

1 答え

  1. テーブル構造をマッピングするJavaクラスを作成する
  2. テーブルレコードをJavaオブジェクトにロードする
  3. jaxb xmlシリアライザを使用してxmlファイルを生成する
0
追加された