package main
import (
"encoding/xml"
"fmt"
"github.com/mantyr/xmlutils"
)
const data = `<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"></soap:Envelope>`
func main() {
var envelope struct {
XMLName xml.Name
Soap string `xml:"xmlns:soap,attr"`
}
xmlutils.Unmarshal([]byte(data), &envelope)
// {XMLName:{Space:http://schemas.xmlsoap.org/soap/envelope/ Local:Envelope}
// Soap:http://schemas.xmlsoap.org/soap/envelope/}
fmt.Printf("%+v\n", envelope)
}