diff -r 13bcc96a5a6c -r 78961db80bae structs.go --- a/structs.go Wed Dec 28 16:10:20 2011 -0700 +++ b/structs.go Thu Dec 29 09:48:36 2011 -0700 @@ -105,6 +105,9 @@ Type string `xml:"attr"` Lang string `xml:"attr"` Error *Error + Subject *Generic + Body *Generic + Thread *Generic Any *Generic } var _ xml.Marshaler = &Message{} @@ -118,6 +121,9 @@ Type string `xml:"attr"` Lang string `xml:"attr"` Error *Error + Show *Generic + Status *Generic + Priority *Generic Any *Generic } var _ xml.Marshaler = &Presence{} @@ -144,6 +150,7 @@ Any *Generic } var _ xml.Marshaler = &Error{} +var _ os.Error = &Error{} // Holds an XML element not described by the more specific types. type Generic struct { @@ -302,6 +309,11 @@ return buf.Bytes(), nil } +func (er *Error) String() string { + bytes, _ := er.MarshalXML() + return string(bytes) +} + func (m *Message) XName() string { return "message" }