my solution: def myxml(): .......... return '<?xml version="1.0" encoding="UTF-8"?>' + str(TAG.response(TAG.result('0'), *[TAG[parameter](request.get_vars[parameter]) for parameter in request.get_vars]))
So, anyone could customize it on their needs. Thanks Massimo. On 24 окт, 21:15, Massimo Di Pierro <massimo.dipie...@gmail.com> wrote: > Yes. You need to implement your own XML serializer. You can use > helpers too for this purpose. It really depends on how your output > should look like. > > On Oct 23, 11:07 pm, KMax <mkostri...@gmail.com> wrote: > > > > > > > > > So, with return dict() and generic.xml view is impossible to produce > > attribute in a xml tag? > > Just to stop looking in this way for solution. > > > Thanks Massimo. > > > On 23 ÏËÔ, 22:53, Massimo Di Pierro <massimo.dipie...@gmail.com> > > wrote: > > > > You can make a myxml.html view that contains: > > > > <?xml version="1.0" encoding="UTF-8"?> > > > <document> > > > š š<itemtitle hello='world'>{{=itemtitle}}</itemtitle> > > > š š<itemvalue>{{=itemvalue}}</itemvalue> > > > </document> > > > > On Oct 23, 5:09šam, KMax <mkostri...@gmail.com> wrote: > > > > > Hello, > > > > š Please help with exporting some dict to .xml view with attributes > > > > inside tags. > > > > > Like: > > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > <document> > > > > š š<itemtitle hello='world'>Title</itemtitle> > > > > š š<itemvalue>Value</itemvalue> > > > > </document> > > > > > I am talking about "hello='world'" in the itemtitle tag. > > > > I know, I could do it with TAG, but how to make it using regular > > > > dict() return? > > > > i mean: > > > > def myxml(): > > > > š š return dict(itemtitle='Title',itemvalue='Value) > > > > > I fail tring to get it works with attribute inside the tag. > > > > > Any Ideas? > > > > > Thanks in advance. > > > > -- > > > > Maxim Kostrikin