If you actually run that example (click Run below it), you will see it is actually writing out eleven lines of XML. If you had two persons, then you would not be marshalling each individually, generally. Instead, you would marshal a slice or array of persons.
See this example: https://play.golang.org/p/OS3hgzCBdN -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
