Let's pass a string instead of a flag or exported enum. The string can
be "attr", "chardata", etc.
What I meant about the outer element is we have to define whether the
marshaler is in control of the name of the element it fills in. Is it in
charge of writing the outer <name> and </name> or not? Probably not,
although that limits what can be done to some extent. You can't simulate
a slice, for example.