Versions in this module Expand all Collapse all v0 v0.4.0 May 28, 2024 v0.3.5 Dec 3, 2022 v0.3.4 Apr 1, 2021 v0.3.3 Sep 13, 2020 v0.3.2 Jun 21, 2020 v0.3.1 Jun 20, 2020 v0.3.0 Apr 26, 2020 v0.2.3 Apr 14, 2020 v0.2.2 Apr 13, 2020 v0.2.1 Apr 9, 2020 v0.2.0 Apr 6, 2020 Changes in this version + func Render(w io.Writer, n *Node) error + type Node struct + Attr []Attribute + Column int + Data string + DataAtom atom.Atom + FirstChild *Node + LastChild *Node + Line int + Namespace string + NextSibling *Node + Parent *Node + PrevSibling *Node + Type NodeType + func Parse(r io.Reader) (*Node, error) + func ParseFragment(r io.Reader, context *Node) ([]*Node, error) + func (n *Node) AppendChild(c *Node) + func (n *Node) InsertBefore(newChild, oldChild *Node) + func (n *Node) RemoveChild(c *Node) + type NodeType uint32 + const CommentNode + const DoctypeNode + const DocumentNode + const ElementNode + const ErrorNode + const TextNode v0.1.0 Sep 9, 2019 Changes in this version + var ErrBufferExceeded = errors.New("max buffer exceeded") + func EscapeString(s string) string + func UnescapeString(s string) string + type Attribute struct + Key string + Namespace string + Val string + type Token struct + Attr []Attribute + Column int + Data string + DataAtom atom.Atom + Line int + Type TokenType + func (t Token) String() string + type TokenType uint32 + const CommentToken + const DoctypeToken + const EndTagToken + const ErrorToken + const SelfClosingTagToken + const StartTagToken + const TextToken + func (t TokenType) String() string + type Tokenizer struct + func NewTokenizer(r io.Reader) *Tokenizer + func NewTokenizerFragment(r io.Reader, contextTag string) *Tokenizer + func (z *Tokenizer) AllowCDATA(allowCDATA bool) + func (z *Tokenizer) Buffered() []byte + func (z *Tokenizer) Err() error + func (z *Tokenizer) Next() TokenType + func (z *Tokenizer) NextIsNotRawText() + func (z *Tokenizer) Raw() []byte + func (z *Tokenizer) SetMaxBuf(n int) + func (z *Tokenizer) TagAttr() (key, val []byte, moreAttr bool) + func (z *Tokenizer) TagName() (name []byte, hasAttr bool) + func (z *Tokenizer) Text() []byte + func (z *Tokenizer) Token() Token