XML
type XML struct {
Indent string
Prefix string
}type ExampleXML struct {
XMLName xml.Name `xml:"example"`
One string `xml:"one,attr"`
Two string `xml:"two,attr"`
}
func handler(ctx iris.Context) {
response := ExampleXML{One: "hello", Two: "xml"}
ctx.XML(response)
}Last updated
Was this helpful?