Golang encoding/xml.Directive.Copy() function example

packaging encoding/xml

Golang encoding/xml.Directive.Copy() function usage example

 decoder := xml.NewDecoder(strings.NewReader(a.Answer))
 token, _ := decoder.Token()
 if token == nil {
 break
 }
 switch tokentype := token.(type)

 case xml.Directive:
 tokentype.Copy()

Reference :

http://golang.org/pkg/encoding/xml/#Directive.Copy

Advertisement