Standard library / encoding/xml
encoding/xml.CharData
Represents text bytes within an XML element. Decoder-returned bytes may alias internal storage. Expected stdout: 'Go\n'.
Formal Syntax & Structure
go syntaxgo
type CharData []byteWorking Example
Example Snippetgo
package main
import ( "encoding/xml" "fmt")
func must(e error) { if e != nil { panic(e) }}
func main() { v := xml.CharData("Go"); fmt.Println(string(v)) }