Marshaler is the interface implemented by objects that can marshal themselves into valid XML elements. MarshalXML encodes the receiver as zero or more XML elements. By convention, arrays or slices are typically encoded as a sequence of elements, one per entry. Using start as the element tag is not
| 92 | // The sequence of encoded tokens must make up zero or more valid |
| 93 | // XML elements. |
| 94 | type Marshaler interface { |
| 95 | MarshalXML(e *Encoder, start StartElement) error |
| 96 | } |
| 97 | |
| 98 | // MarshalerAttr is the interface implemented by objects that can marshal |
| 99 | // themselves into valid XML attributes. |