Standard library / encoding/xml

encoding/xml.EndElement

Represents a closing element with its resolved Name. Expected stdout: 'a\n'.

Formal Syntax & Structure

go syntaxgo
type EndElement struct {  Name Name}

Working Example

Example Snippetgo
package main
import (  "encoding/xml"  "fmt"  "strings")
func must(e error) {  if e != nil {    panic(e)  }}
func main() {  d := xml.NewDecoder(strings.NewReader("<a/>"))  _, e := d.Token()  must(e)  t, e := d.Token()  must(e)  fmt.Println(t.(xml.EndElement).Name.Local)}
Go Reference