func (t *Timestamp) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
	if t == nil || t.IsZero() {
		return e.EncodeElement(nil, start)
	}
	return e.EncodeElement(t.String(), start)
}
MarshalXML implements a custom xml marshal method used when this type is
marshaled using xml.Marshal.
package types
import (
	"encoding/json"
	"encoding/xml"
	"fmt"
	"time"
)
type Timestamp struct {
	time.Time
}
func ParseTimestamp(s string) (*Timestamp, error) {
	if s == "" {
		return nil, nil
	}
	tt, err := ParseTime(s)
	return &Timestamp{Time: tt}, err
}
func (t *Timestamp) MarshalJSON() ([]byte, error) {
	if t == nil || t.IsZero() {
		return []byte(`""`), nil
	}
	return []byte(fmt.Sprintf("%q", t)), nil
}
func (t *Timestamp) UnmarshalJSON(b []byte) error {
	var timestamp string
	if err := json.Unmarshal(b, &timestamp); err != nil {
		return err
	}
	var err error
	t.Time, err = ParseTime(timestamp)
	return err
}