Drop <?xml version="1.0" encoding="UTF-8"?>

23 views
Skip to first unread message

parsa

unread,
Oct 25, 2010, 6:23:41 AM10/25/10
to Lift
Hi folks,

In my REST interface I plan to return small HTML fragments. But by
returning an Elem, the <?xml version="1.0" encoding="UTF-8"?> and text/
xml MIME type are added to the document which make me unable to use it
as HTML fragment. How can I omit these from the XML response? I think
better solution would be to have a snippet but I don't want to change
my REST structure right now.

Cheers,
Parsa

Indrajit Raychaudhuri

unread,
Oct 25, 2010, 7:02:57 AM10/25/10
to lif...@googlegroups.com
Hi Parsa,

You can try this:

At app level, LiftRules.calculateXmlHeader = ""
or at session level, S.skipXmlHeader = true

- Indrajit

parsa

unread,
Oct 25, 2010, 11:21:06 AM10/25/10
to Lift
Cheers.
Reply all
Reply to author
Forward
0 new messages