Documentation ¶
Overview ¶
Package xhtml makes x/net/html easier
Index ¶
- Constants
- Variables
- func AdoptChildren(dst, src *html.Node)
- func AppendText(n *html.Node, text string)
- func BreadFirst(n *html.Node, yield func(*html.Node) bool) bool
- func Closest(n *html.Node, cond func(*html.Node) bool) *html.Node
- func ContentsToString(n *html.Node) string
- func Find(n *html.Node, callback func(*html.Node) *html.Node) *html.Node
- func FindAll(root *html.Node, filter func(*html.Node) bool) []*html.Node
- func InnerText(n *html.Node) string
- func IsEmpty(n *html.Node) bool
- func LastChildOrNew(p *html.Node, tag string, attrs ...string) *html.Node
- func Map[T any](tbl TableNodes, f func(*html.Node) T) [][]T
- func New(tag string, attrs ...string) *html.Node
- func Tables(root *html.Node, f func(tbl *html.Node, rows TableNodes))
- func ToString(n *html.Node) string
- func VisitAll(n *html.Node, callback func(*html.Node))
- type TableNodes
Constants ¶
View Source
const ( Done = false Continue = true )
Variables ¶
View Source
var InlineElements = map[atom.Atom]bool{ atom.A: true, atom.Abbr: true, atom.Acronym: true, atom.B: true, atom.Bdi: true, atom.Bdo: true, atom.Big: true, atom.Br: true, atom.Cite: true, atom.Code: true, atom.Del: true, atom.Dfn: true, atom.Em: true, atom.I: true, atom.Ins: true, atom.Kbd: true, atom.Label: true, atom.Mark: true, atom.Meter: true, atom.Output: true, atom.Q: true, atom.Ruby: true, atom.S: true, atom.Samp: true, atom.Small: true, atom.Span: true, atom.Strong: true, atom.Sub: true, atom.Sup: true, atom.U: true, atom.Tt: true, atom.Var: true, atom.Wbr: true, }
Functions ¶
func AdoptChildren ¶
func AppendText ¶
func ContentsToString ¶
Types ¶
type TableNodes ¶
Click to show internal directories.
Click to hide internal directories.