Add protocol version to inserted XML.
[Sone.git] / src / main / resources / templates / insert / sone.xml
1 <?xml version="1.0" encoding="utf-8" ?>
2 <sone>
3
4         <time><% currentSone.time></time>
5         <protocol-version>0</protocol-version>
6
7         <client>
8                 <name>Sone</name>
9                 <version><% version|xml></version>
10         </client>
11
12         <profile>
13                 <first-name><% currentSone.profile.firstName|xml></first-name>
14                 <middle-name><% currentSone.profile.middleName|xml></middle-name>
15                 <last-name><% currentSone.profile.lastName|xml></last-name>
16                 <birth-day><% currentSone.profile.birthDay|xml></birth-day>
17                 <birth-month><% currentSone.profile.birthMonth|xml></birth-month>
18                 <birth-year><% currentSone.profile.birthYear|xml></birth-year>
19         </profile>
20
21         <posts>
22                 <%foreach currentSone.posts post>
23                 <post>
24                         <id><% post.id|xml></id>
25                         <recipient><%ifnull !post.recipient><% post.recipient.id|xml><%/if></recipient>
26                         <time><% post.time></time>
27                         <text><% post.text|xml></text>
28                 </post>
29                 <%/foreach>
30         </posts>
31
32         <replies>
33                 <%foreach currentSone.replies reply>
34                 <reply>
35                         <id><% reply.id></id>
36                         <post-id><% reply.post.id|xml></post-id>
37                         <time><% reply.time></time>
38                         <text><% reply.text|xml></text>
39                 </reply>
40                 <%/foreach>
41         </replies>
42
43         <post-likes>
44                 <%foreach currentSone.likedPostIds postId>
45                 <post-like><% postId|xml></post-like>
46                 <%/foreach>
47         </post-likes>
48
49         <reply-likes>
50                 <%foreach currentSone.likedReplyIds replyId>
51                 <reply-like><% replyId|xml></reply-like>
52                 <%/foreach>
53         </reply-likes>
54
55 </sone>