func (r XML) Render(w http.ResponseWriter) (err error) {
	r.WriteContentType(w)
	if err = xml.NewEncoder(w).Encode(r.Data); err != nil {
		err = errors.WithStack(err)
	}
	return
}
Render (XML) writes data with xml ContentType.
package render
import (
	"encoding/xml"
	"net/http"
	"github.com/pkg/errors"
)
type XML struct {
	Code    int
	Message string
	Data    interface{}
}
var xmlContentType = []string{"application/xml; charset=utf-8"}