Versions in this module Expand all Collapse all go1 go1.18.10 Jan 10, 2023 Changes in this version + const Header + var HTMLAutoClose []string = htmlAutoClose + var HTMLEntity map[string]string = htmlEntity + func Escape(w io.Writer, s []byte) + func EscapeText(w io.Writer, s []byte) error + func Marshal(v any) ([]byte, error) + func MarshalIndent(v any, prefix, indent string) ([]byte, error) + func Unmarshal(data []byte, v any) error + type Attr struct + Name Name + Value string + type CharData []byte + func (c CharData) Copy() CharData + type Comment []byte + func (c Comment) Copy() Comment + type Decoder struct + AutoClose []string + CharsetReader func(charset string, input io.Reader) (io.Reader, error) + DefaultSpace string + Entity map[string]string + Strict bool + func NewDecoder(r io.Reader) *Decoder + func NewTokenDecoder(t TokenReader) *Decoder + func (d *Decoder) Decode(v any) error + func (d *Decoder) DecodeElement(v any, start *StartElement) error + func (d *Decoder) InputOffset() int64 + func (d *Decoder) RawToken() (Token, error) + func (d *Decoder) Skip() error + func (d *Decoder) Token() (Token, error) + type Directive []byte + func (d Directive) Copy() Directive + type Encoder struct + func NewEncoder(w io.Writer) *Encoder + func (enc *Encoder) Encode(v any) error + func (enc *Encoder) EncodeElement(v any, start StartElement) error + func (enc *Encoder) EncodeToken(t Token) error + func (enc *Encoder) Flush() error + func (enc *Encoder) Indent(prefix, indent string) + type EndElement struct + Name Name + type Marshaler interface + MarshalXML func(e *Encoder, start StartElement) error + type MarshalerAttr interface + MarshalXMLAttr func(name Name) (Attr, error) + type Name struct + Local string + Space string + type ProcInst struct + Inst []byte + Target string + func (p ProcInst) Copy() ProcInst + type StartElement struct + Attr []Attr + Name Name + func (e StartElement) Copy() StartElement + func (e StartElement) End() EndElement + type SyntaxError struct + Line int + Msg string + func (e *SyntaxError) Error() string + type TagPathError struct + Field1 string + Field2 string + Struct reflect.Type + Tag1 string + Tag2 string + func (e *TagPathError) Error() string + type Token any + func CopyToken(t Token) Token + type TokenReader interface + Token func() (Token, error) + type UnmarshalError string + func (e UnmarshalError) Error() string + type Unmarshaler interface + UnmarshalXML func(d *Decoder, start StartElement) error + type UnmarshalerAttr interface + UnmarshalXMLAttr func(attr Attr) error + type UnsupportedTypeError struct + Type reflect.Type + func (e *UnsupportedTypeError) Error() string