28 lines
446 B
Go
28 lines
446 B
Go
package netsplit
|
|
|
|
import (
|
|
`encoding/xml`
|
|
`strconv`
|
|
)
|
|
|
|
func (i *IANARegistryFootnote) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error) {
|
|
|
|
var u64 uint64
|
|
|
|
for _, a := range start.Attr {
|
|
switch a.Name.Local {
|
|
case "anchor":
|
|
if u64, err = strconv.ParseUint(a.Value, 10, 64); err != nil {
|
|
return
|
|
}
|
|
i.ReferenceIdx = uint(u64)
|
|
}
|
|
}
|
|
|
|
if err = d.DecodeElement(&i.Note, &start); err != nil {
|
|
return
|
|
}
|
|
|
|
return
|
|
}
|