code: func (enc *Encoder) Encode(v interface{}) error {
  	err := enc.p.marshalValue(reflect.ValueOf(v), nil, nil)
  	if err != nil {
  		return err
  	}
  	return enc.p.Flush()
  }
docs: // Encode writes the XML encoding of v to the stream.
  //
  // See the documentation for Marshal for details about the conversion
  // of Go values to XML.
  //
  // Encode calls Flush before returning.