htmlx

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2025 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindAndGetHeadMetas added in v1.0.16

func FindAndGetHeadMetas(doc *html.Node) map[string]string

func FindAndGetHeadTitle added in v1.0.16

func FindAndGetHeadTitle(doc *html.Node) string

func FindAndGetHtmlLang added in v1.0.16

func FindAndGetHtmlLang(doc *html.Node) string

func FindElementNode

func FindElementNode(n *html.Node, tag atom.Atom) *html.Node

func FindElementNodes

func FindElementNodes(root *html.Node, tag atom.Atom) (ns []*html.Node)

func FindNodeAttr added in v1.0.16

func FindNodeAttr(n *html.Node, k string) *html.Attribute

func GetNodeAttrValue added in v1.0.27

func GetNodeAttrValue(n *html.Node, k string) string

func HTML added in v1.0.22

func HTML(n *html.Node) (string, error)

func HTMLFileTextify

func HTMLFileTextify(w io.Writer, name string, detect int, charsets ...string) error

func HTMLFileTextifyString added in v1.0.27

func HTMLFileTextifyString(name string, detect int, charsets ...string) (string, error)

func HTMLNodeTextify added in v1.0.27

func HTMLNodeTextify(w io.Writer, n *html.Node) error

func HTMLNodeTextifyString added in v1.0.27

func HTMLNodeTextifyString(node *html.Node) string

func HTMLReaderTextify

func HTMLReaderTextify(w io.Writer, r io.Reader) error

func HTMLReaderTextifyString added in v1.0.27

func HTMLReaderTextifyString(r io.Reader) (string, error)

func HTMLTextify added in v1.0.27

func HTMLTextify(w io.Writer, html string) error

func HTMLTextifyString added in v1.0.27

func HTMLTextifyString(html string) (string, error)

func IterElementNodes added in v1.0.16

func IterElementNodes(n *html.Node, iter func(n *html.Node) error) error

func IterNodes added in v1.0.16

func IterNodes(n *html.Node, iter func(n *html.Node) error) error

func ParseHTMLFile

func ParseHTMLFile(name string, detect int, charsets ...string) (*html.Node, error)

func Stringify

func Stringify(n *html.Node) string

Types

type Textifier

type Textifier struct {
	Custom func(tf *Textifier, n *html.Node) (bool, error)
	// contains filtered or unexported fields
}

func NewTextifier

func NewTextifier(w io.Writer) *Textifier

func (*Textifier) A added in v1.0.27

func (tf *Textifier) A(n *html.Node) error

func (*Textifier) Blockquote added in v1.0.27

func (tf *Textifier) Blockquote(n *html.Node) error

func (*Textifier) Bold added in v1.0.27

func (tf *Textifier) Bold(n *html.Node) error

func (*Textifier) Dd added in v1.0.27

func (tf *Textifier) Dd(n *html.Node) error

func (*Textifier) Deep added in v1.0.27

func (tf *Textifier) Deep(n *html.Node) error

func (*Textifier) Eol added in v1.0.27

func (tf *Textifier) Eol() error

func (*Textifier) HbrDeep added in v1.0.27

func (tf *Textifier) HbrDeep(n *html.Node, x int) error

func (*Textifier) Img added in v1.0.27

func (tf *Textifier) Img(n *html.Node) error

func (*Textifier) Italic added in v1.0.27

func (tf *Textifier) Italic(n *html.Node) error

func (*Textifier) LbrDeep added in v1.0.27

func (tf *Textifier) LbrDeep(n *html.Node) error

func (*Textifier) Li added in v1.0.27

func (tf *Textifier) Li(n *html.Node) error

func (*Textifier) Ol added in v1.0.27

func (tf *Textifier) Ol(n *html.Node) error

func (*Textifier) RawDeep added in v1.0.27

func (tf *Textifier) RawDeep(n *html.Node) error

func (*Textifier) RbrDeep added in v1.0.27

func (tf *Textifier) RbrDeep(n *html.Node) error

func (*Textifier) Strike added in v1.0.27

func (tf *Textifier) Strike(n *html.Node) error

func (*Textifier) Td added in v1.0.27

func (tf *Textifier) Td(n *html.Node) error

func (*Textifier) Text added in v1.0.27

func (tf *Textifier) Text(s string) error

func (*Textifier) Textify

func (tf *Textifier) Textify(n *html.Node) error

func (*Textifier) Thead added in v1.0.27

func (tf *Textifier) Thead(n *html.Node) error

func (*Textifier) Title added in v1.0.27

func (tf *Textifier) Title(n *html.Node) error

func (*Textifier) Tr added in v1.0.27

func (tf *Textifier) Tr(n *html.Node) error

func (*Textifier) Ul added in v1.0.27

func (tf *Textifier) Ul(n *html.Node) error

func (*Textifier) WbrDeep added in v1.0.27

func (tf *Textifier) WbrDeep(n *html.Node) error

func (*Textifier) WrapDeep added in v1.0.27

func (tf *Textifier) WrapDeep(n *html.Node, w string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL