func receiverType(val interface{}) string {
	t := reflect.TypeOf(val)
	if t.Name() != "" {
		return t.String()
	}
	return "(" + t.String() + ")"
}
receiverType returns the receiver type to use in an expression like "%s.MethodName".
package xml
import (
	"bytes"
	"encoding"
	"errors"
	"fmt"
	"reflect"
	"strconv"
	"strings"
)
func Unmarshal(data []byte, v interface{}) error {
	return NewDecoder(bytes.NewReader(data)).Decode(v)
}
func (d *Decoder) Decode(v interface{}) error {
	return d.DecodeElement(v, nil)
}
func (d *Decoder) DecodeElement(v interface{}, start *StartElement) error {
	val := reflect.ValueOf(v)
	if val.Kind() != reflect.Ptr {
		return errors.New("non-pointer passed to Unmarshal")
	}
	return d.unmarshal(val.Elem(), start)
}
type UnmarshalError string
func (e UnmarshalError) Error() string { return string(e) }
type Unmarshaler interface {
	UnmarshalXML(d *Decoder, start StartElement) error
}
type UnmarshalerAttr interface {
	UnmarshalXMLAttr(attr Attr) error
}