Don’t use the HTML filter to write XML.
[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
7         <profile>
8                 <first-name><% currentSone.profile.firstName|xml></first-name>
9                 <middle-name><% currentSone.profile.middleName|xml></middle-name>
10                 <last-name><% currentSone.profile.lastName|xml></last-name>
11         </profile>
12
13         <posts>
14                 <%foreach currentSone.posts post>
15                 <post>
16                         <id><% post.id|xml></id>
17                         <time><% post.time></time>
18                         <text><% post.text|xml></text>
19                 </post>
20                 <%/foreach>
21         </posts>
22
23         <replies>
24                 <%foreach currentSone.replies reply>
25                 <reply>
26                         <id><% reply.id></id>
27                         <post-id><% reply.post.id|xml></post-id>
28                         <time><% reply.time></time>
29                         <text><% reply.text|xml></text>
30                 </reply>
31                 <%/foreach>
32         </replies>
33
34         <friends>
35                 <%foreach currentSone.friends friend>
36                 <friend>
37                         <sone-id><% friend.id|xml></sone-id>
38                         <sone-key><% friend.requestUri|xml></sone-key>
39                         <sone-name><% friend.name|xml></sone-name>
40                 </friend>
41                 <%/foreach>
42         </friends>
43
44         <known-sones>
45                 <%foreach knownSones sone>
46                 <known-sone>
47                         <sone-id><% sone.id|xml></sone-id>
48                         <sone-key><% sone.requestUri|xml></sone-key>
49                         <sone-name><% sone.name|xml></sone-name>
50                 </known-sone>
51                 <%/foreach>
52         </known-sones>
53
54 </sone>