diff --git a/person.go b/person.go index bf947bd..431a4c7 100644 --- a/person.go +++ b/person.go @@ -13,6 +13,10 @@ type Person struct { Extensions []*ExtensionElement `xml:",any,omitempty"` } +func NewPerson(name string) *Person { + return &Person{Name: name} +} + func (p *Person) Check() error { if p.Name == "" { return errors.New("name element of person element empty")