page.xmlns = "http://www.xwiki.org";
XStream xstream = new XStream();
xstream.alias("page", Page.class);
xstream.useAttributeFor(Page.class, "xmlns");
xstream.aliasField("xmlns", Page.class, "xmlns");
xstream.ignoreUnknownElements();
String xml = xstream.toXML(page);
return xml;
default:
return resource.getContent();
}