You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: document.go
    path of file: ./repos/scan4all/vendor/github.com/masterzen/simplexml/dom
    
    the code of the file until where you have to start completion: package dom

import (
	"bytes"
	"fmt"
)

type Document struct {
	root *Elemen
    
func (doc *Document) String() string {
	var b bytes.Buffer
	if doc.DocType {
		fmt.Fprintln(&b, `<?xml version="1.0" encoding="utf-8" ?>`)
	}
	
	if doc.root != nil {
		doc.root.Bytes(&b, doc.PrettyPrint, doc.Indentation, 0)
	}
	
	return string(b.Bytes())
}