Store and parse replies in/from inserted Sone.
[Sone.git] / src / main / resources / templates / insert / sone.xml
1 <?xml version="1.0" encoding="utf-8" ?>
2 <sone>
3
4         <id><% currentSone.id></id>
5         <name><% currentSone.name|xml></name>
6         <time><% currentSone.time></time>
7
8         <profile>
9                 <first-name><% currentSone.profile.firstName|xml></first-name>
10                 <middle-name><% currentSone.profile.middleName|xml></middle-name>
11                 <last-name><% currentSone.profile.lastName|xml></last-name>
12         </profile>
13
14         <posts>
15                 <%foreach currentSone.posts post>
16                 <post>
17                         <id><% post.id|xml></id>
18                         <time><% post.time></time>
19                         <text><% post.text|xml></text>
20                 </post>
21                 <%/foreach>
22         </posts>
23
24         <replies>
25                 <%foreach currentSone.replies reply>
26                 <reply>
27                         <id><% reply.id></id>
28                         <post-id><% reply.post.id|xml></post-id>
29                         <time><% reply.time></time>
30                         <text><% reply.text|xml></text>
31                 </reply>
32                 <%/foreach>
33         </replies>
34
35         <post-likes>
36                 <%foreach currentSone.likedPostIds postId>
37                 <post-like><% postId|xml></post-like>
38                 <%/foreach>
39         </post-likes>
40
41         <reply-likes>
42                 <%foreach currentSone.likedReplyIds replyId>
43                 <reply-like><% replyId|xml></reply-like>
44                 <%/foreach>
45         </reply-likes>
46
47         <known-sones>
48                 <%foreach knownSones sone>
49                 <known-sone>
50                         <sone-id><% sone.id|xml></sone-id>
51                         <sone-key><% sone.requestUri|xml></sone-key>
52                         <sone-name><% sone.name|xml></sone-name>
53                 </known-sone>
54                 <%/foreach>
55         </known-sones>
56
57 </sone>