Versions in this module Expand all Collapse all v1 v1.3.0 Sep 25, 2026 Changes in this version + const XMLNamespace + var ErrDoctype = errors.New("xml: DOCTYPE refused") + var ErrEncoding = errors.New("xml: declared encoding is not UTF-8") + var ErrNotStart = errors.New("xml: not positioned on a start element") + var ErrTooDeep = errors.New("xml: nesting exceeds MaxDepth") + var ErrTooLarge = errors.New("xml: token exceeds MaxBufferBytes") + var ErrTruncated = errors.New("xml: unexpected end of input") + func Equal(b []byte, s string) bool + func Unescape(dst, src []byte) []byte + type Decodable interface + DecodeXMLFrom func(r *Reader) error + type Element struct + type Kind uint8 + const CData + const Comment + const Directive + const EOF + const EndElement + const None + const ProcInst + const StartElement + const Text + func (k Kind) String() string + type Options struct + AllowDoctype bool + BufferSize int + MaxBufferBytes int + MaxDepth int + type Reader struct + func NewBytesReader(data []byte, opts Options) *Reader + func NewReader(src io.Reader, opts Options) *Reader + func (r *Reader) Attr(name string) (Value, bool) + func (r *Reader) Children(e Element) iter.Seq[[]byte] + func (r *Reader) Decode(d Decodable) error + func (r *Reader) Depth() int + func (r *Reader) Element() Element + func (r *Reader) ElementText() (Value, error) + func (r *Reader) Err() error + func (r *Reader) Kind() Kind + func (r *Reader) LocalName() []byte + func (r *Reader) LookupNamespace(prefix []byte) (string, bool) + func (r *Reader) Name() []byte + func (r *Reader) NameIs(s string) bool + func (r *Reader) Namespace() string + func (r *Reader) Next() (Kind, error) + func (r *Reader) NextAttr() (name []byte, value Value, ok bool) + func (r *Reader) NextChild(e Element) (bool, error) + func (r *Reader) Offset() int64 + func (r *Reader) Prefix() []byte + func (r *Reader) RawElement() ([]byte, error) + func (r *Reader) Reset(src io.Reader) + func (r *Reader) ResetBytes(data []byte) + func (r *Reader) Skip() error + func (r *Reader) Text() Value + func (r *Reader) Tokens() iter.Seq[Kind] + type SyntaxError struct + Msg string + Offset int64 + func (e *SyntaxError) Error() string + type Value []byte + func (v Value) AppendTo(dst []byte) []byte + func (v Value) Bool() (bool, error) + func (v Value) Equal(s string) bool + func (v Value) EqualFold(s string) bool + func (v Value) Float() (float64, error) + func (v Value) HasEntities() bool + func (v Value) Int() (int64, error) + func (v Value) String() string + func (v Value) Uint() (uint64, error)