Documentation ¶
Overview ¶
Package query provides a fluent and functional interface for querying HTML DOM using Go. It is based on golang.org/x/net/html.
Index ¶
- type Node
- func (n *Node) A(cs ...Checker) *Node
- func (n *Node) Abbr(cs ...Checker) *Node
- func (n *Node) Abbr_(pat ...string) *string
- func (n *Node) Accept(pat ...string) *string
- func (n *Node) AcceptCharset(pat ...string) *string
- func (n *Node) Accesskey(pat ...string) *string
- func (n *Node) Action(pat ...string) *string
- func (n *Node) Address(cs ...Checker) *Node
- func (n *Node) Ahref(cs ...Checker) *Node
- func (n *Node) AllText(pat ...string) *string
- func (n *Node) Allowfullscreen(pat ...string) *string
- func (n *Node) Allowpaymentrequest(pat ...string) *string
- func (n *Node) Allowusermedia(pat ...string) *string
- func (n *Node) Alt(pat ...string) *string
- func (n *Node) Area(cs ...Checker) *Node
- func (n *Node) Article(cs ...Checker) *Node
- func (n *Node) As(pat ...string) *string
- func (n *Node) Aside(cs ...Checker) *Node
- func (n *Node) Async(pat ...string) *string
- func (n *Node) Attr(key string, pat ...string) *string
- func (n *Node) Audio(cs ...Checker) *Node
- func (n *Node) Autocomplete(pat ...string) *string
- func (n *Node) Autofocus(pat ...string) *string
- func (n *Node) Autoplay(pat ...string) *string
- func (n *Node) B(cs ...Checker) *Node
- func (n *Node) Base(cs ...Checker) *Node
- func (n *Node) Bdi(cs ...Checker) *Node
- func (n *Node) Bdo(cs ...Checker) *Node
- func (n *Node) Blockquote(cs ...Checker) *Node
- func (n *Node) Body(cs ...Checker) *Node
- func (n *Node) Br(cs ...Checker) *Node
- func (n *Node) Button(cs ...Checker) *Node
- func (n *Node) Canvas(cs ...Checker) *Node
- func (n *Node) Caption(cs ...Checker) *Node
- func (n *Node) Charset(pat ...string) *string
- func (n *Node) Checked(pat ...string) *string
- func (n *Node) Children(cs ...Checker) NodeIter
- func (n *Node) Cite(cs ...Checker) *Node
- func (n *Node) Cite_(pat ...string) *string
- func (n *Node) Class(pat ...string) *string
- func (n *Node) Code(cs ...Checker) *Node
- func (n *Node) Col(cs ...Checker) *Node
- func (n *Node) Colgroup(cs ...Checker) *Node
- func (n *Node) Color(pat ...string) *string
- func (n *Node) Cols(pat ...string) *string
- func (n *Node) Colspan(pat ...string) *string
- func (n *Node) Content(pat ...string) *string
- func (n *Node) Contenteditable(pat ...string) *string
- func (n *Node) Controls(pat ...string) *string
- func (n *Node) Coords(pat ...string) *string
- func (n *Node) Crossorigin(pat ...string) *string
- func (n *Node) Data(cs ...Checker) *Node
- func (n *Node) Data_(pat ...string) *string
- func (n *Node) Datalist(cs ...Checker) *Node
- func (n *Node) Datetime(pat ...string) *string
- func (n *Node) Dd(cs ...Checker) *Node
- func (n *Node) Default(pat ...string) *string
- func (n *Node) Defer(pat ...string) *string
- func (n *Node) Del(cs ...Checker) *Node
- func (n *Node) Descendants(cs ...Checker) NodeIter
- func (n *Node) Details(cs ...Checker) *Node
- func (n *Node) Dfn(cs ...Checker) *Node
- func (n *Node) Dialog(cs ...Checker) *Node
- func (n *Node) Dir(pat ...string) *string
- func (n *Node) Dirname(pat ...string) *string
- func (n *Node) Disabled(pat ...string) *string
- func (n *Node) Div(cs ...Checker) *Node
- func (n *Node) Dl(cs ...Checker) *Node
- func (n *Node) Download(pat ...string) *string
- func (n *Node) Draggable(pat ...string) *string
- func (n *Node) Dt(cs ...Checker) *Node
- func (n *Node) Em(cs ...Checker) *Node
- func (n *Node) Embed(cs ...Checker) *Node
- func (n *Node) Enctype(pat ...string) *string
- func (n *Node) Fieldset(cs ...Checker) *Node
- func (n *Node) Figcaption(cs ...Checker) *Node
- func (n *Node) Figure(cs ...Checker) *Node
- func (n *Node) Find(cs ...Checker) *Node
- func (n *Node) FindChild(cs ...Checker) *Node
- func (n *Node) FindNext(cs ...Checker) *Node
- func (n *Node) Footer(cs ...Checker) *Node
- func (n *Node) For(pat ...string) *string
- func (n *Node) Form(cs ...Checker) *Node
- func (n *Node) Form_(pat ...string) *string
- func (n *Node) Formaction(pat ...string) *string
- func (n *Node) Formenctype(pat ...string) *string
- func (n *Node) Formmethod(pat ...string) *string
- func (n *Node) Formnovalidate(pat ...string) *string
- func (n *Node) Formtarget(pat ...string) *string
- func (n *Node) H1(cs ...Checker) *Node
- func (n *Node) H2(cs ...Checker) *Node
- func (n *Node) H3(cs ...Checker) *Node
- func (n *Node) H4(cs ...Checker) *Node
- func (n *Node) H5(cs ...Checker) *Node
- func (n *Node) H6(cs ...Checker) *Node
- func (n *Node) Head(cs ...Checker) *Node
- func (n *Node) Header(cs ...Checker) *Node
- func (n *Node) Headers(pat ...string) *string
- func (n *Node) Height(pat ...string) *string
- func (n *Node) Hgroup(cs ...Checker) *Node
- func (n *Node) Hidden(pat ...string) *string
- func (n *Node) High(pat ...string) *string
- func (n *Node) Hr(cs ...Checker) *Node
- func (n *Node) Href(pat ...string) *string
- func (n *Node) Hreflang(pat ...string) *string
- func (n *Node) Html(cs ...Checker) *Node
- func (n *Node) HttpEquiv(pat ...string) *string
- func (n *Node) I(cs ...Checker) *Node
- func (n *Node) Id(pat ...string) *string
- func (n *Node) Iframe(cs ...Checker) *Node
- func (n *Node) Img(cs ...Checker) *Node
- func (n *Node) Input(cs ...Checker) *Node
- func (n *Node) Inputmode(pat ...string) *string
- func (n *Node) Ins(cs ...Checker) *Node
- func (n *Node) Integrity(pat ...string) *string
- func (n *Node) InternalNode() *html.Node
- func (n *Node) Is(pat ...string) *string
- func (n *Node) Ismap(pat ...string) *string
- func (n *Node) Itemid(pat ...string) *string
- func (n *Node) Itemprop(pat ...string) *string
- func (n *Node) Itemref(pat ...string) *string
- func (n *Node) Itemscope(pat ...string) *string
- func (n *Node) Itemtype(pat ...string) *string
- func (n *Node) Kbd(cs ...Checker) *Node
- func (n *Node) Kind(pat ...string) *string
- func (n *Node) Label(cs ...Checker) *Node
- func (n *Node) Label_(pat ...string) *string
- func (n *Node) Lang(pat ...string) *string
- func (n *Node) Legend(cs ...Checker) *Node
- func (n *Node) Li(cs ...Checker) *Node
- func (n *Node) Link(cs ...Checker) *Node
- func (n *Node) List(pat ...string) *string
- func (n *Node) Loop(pat ...string) *string
- func (n *Node) Low(pat ...string) *string
- func (n *Node) Manifest(pat ...string) *string
- func (n *Node) Map(cs ...Checker) *Node
- func (n *Node) Mark(cs ...Checker) *Node
- func (n *Node) Max(pat ...string) *string
- func (n *Node) Maxlength(pat ...string) *string
- func (n *Node) Media(pat ...string) *string
- func (n *Node) Menu(cs ...Checker) *Node
- func (n *Node) Meta(cs ...Checker) *Node
- func (n *Node) Meter(cs ...Checker) *Node
- func (n *Node) Method(pat ...string) *string
- func (n *Node) Min(pat ...string) *string
- func (n *Node) Minlength(pat ...string) *string
- func (n *Node) Multiple(pat ...string) *string
- func (n *Node) Muted(pat ...string) *string
- func (n *Node) Name(pat ...string) *string
- func (n *Node) Nav(cs ...Checker) *Node
- func (n *Node) NextSibling() *Node
- func (n *Node) Nomodule(pat ...string) *string
- func (n *Node) Nonce(pat ...string) *string
- func (n *Node) Noscript(cs ...Checker) *Node
- func (n *Node) Novalidate(pat ...string) *string
- func (n *Node) Object(cs ...Checker) *Node
- func (n *Node) Ol(cs ...Checker) *Node
- func (n *Node) Open(pat ...string) *string
- func (n *Node) Optgroup(cs ...Checker) *Node
- func (n *Node) Optimum(pat ...string) *string
- func (n *Node) Option(cs ...Checker) *Node
- func (n *Node) Output(cs ...Checker) *Node
- func (n *Node) P(cs ...Checker) *Node
- func (n *Node) Param(cs ...Checker) *Node
- func (n *Node) Parent() *Node
- func (n *Node) Pattern(pat ...string) *string
- func (n *Node) Ping(pat ...string) *string
- func (n *Node) Placeholder(pat ...string) *string
- func (n *Node) PlainText() *string
- func (n *Node) Playsinline(pat ...string) *string
- func (n *Node) Poster(pat ...string) *string
- func (n *Node) Pre(cs ...Checker) *Node
- func (n *Node) Preload(pat ...string) *string
- func (n *Node) PrettyPrint()
- func (n *Node) PrettyRender(w io.Writer, indentSize int) error
- func (n *Node) PrevSibling() *Node
- func (n *Node) Progress(cs ...Checker) *Node
- func (n *Node) Q(cs ...Checker) *Node
- func (n *Node) Readonly(pat ...string) *string
- func (n *Node) Referrerpolicy(pat ...string) *string
- func (n *Node) Rel(pat ...string) *string
- func (n *Node) Render() *string
- func (n *Node) RenderChildren() *string
- func (n *Node) RenderTagOnly() *string
- func (n *Node) Required(pat ...string) *string
- func (n *Node) Reversed(pat ...string) *string
- func (n *Node) Rows(pat ...string) *string
- func (n *Node) Rowspan(pat ...string) *string
- func (n *Node) Rp(cs ...Checker) *Node
- func (n *Node) Rt(cs ...Checker) *Node
- func (n *Node) Ruby(cs ...Checker) *Node
- func (n *Node) S(cs ...Checker) *Node
- func (n *Node) Samp(cs ...Checker) *Node
- func (n *Node) Sandbox(pat ...string) *string
- func (n *Node) Satisfy(cs ...Checker) bool
- func (n *Node) Scope(pat ...string) *string
- func (n *Node) Script(cs ...Checker) *Node
- func (n *Node) Section(cs ...Checker) *Node
- func (n *Node) Select(cs ...Checker) *Node
- func (n *Node) Selected(pat ...string) *string
- func (n *Node) Shape(pat ...string) *string
- func (n *Node) Size(pat ...string) *string
- func (n *Node) Sizes(pat ...string) *string
- func (n *Node) Slot_(pat ...string) *string
- func (n *Node) Small(cs ...Checker) *Node
- func (n *Node) Source(cs ...Checker) *Node
- func (n *Node) Span(cs ...Checker) *Node
- func (n *Node) Span_(pat ...string) *string
- func (n *Node) Spellcheck(pat ...string) *string
- func (n *Node) Src(pat ...string) *string
- func (n *Node) Srcdoc(pat ...string) *string
- func (n *Node) Srclang(pat ...string) *string
- func (n *Node) Srcset(pat ...string) *string
- func (n *Node) Start(pat ...string) *string
- func (n *Node) Step(pat ...string) *string
- func (n *Node) Strong(cs ...Checker) *Node
- func (n *Node) Style(cs ...Checker) *Node
- func (n *Node) Style_(pat ...string) *string
- func (n *Node) Sub(cs ...Checker) *Node
- func (n *Node) Summary(cs ...Checker) *Node
- func (n *Node) Sup(cs ...Checker) *Node
- func (n *Node) Tabindex(pat ...string) *string
- func (n *Node) Table(cs ...Checker) *Node
- func (n *Node) Target(pat ...string) *string
- func (n *Node) Tbody(cs ...Checker) *Node
- func (n *Node) Td(cs ...Checker) *Node
- func (n *Node) Text(pat ...string) *string
- func (n *Node) TextNode(pat string) *TextNodeNode
- func (n *Node) Textarea(cs ...Checker) *Node
- func (n *Node) Tfoot(cs ...Checker) *Node
- func (n *Node) Th(cs ...Checker) *Node
- func (n *Node) Thead(cs ...Checker) *Node
- func (n *Node) Time(cs ...Checker) *Node
- func (n *Node) Title(cs ...Checker) *Node
- func (n *Node) Title_(pat ...string) *string
- func (n *Node) Tr(cs ...Checker) *Node
- func (n *Node) Track(cs ...Checker) *Node
- func (n *Node) Translate(pat ...string) *string
- func (n *Node) Type(pat ...string) *string
- func (n *Node) Typemustmatch(pat ...string) *string
- func (n *Node) U(cs ...Checker) *Node
- func (n *Node) Ul(cs ...Checker) *Node
- func (n *Node) Updateviacache(pat ...string) *string
- func (n *Node) Usemap(pat ...string) *string
- func (n *Node) Value(pat ...string) *string
- func (n *Node) Var(cs ...Checker) *Node
- func (n *Node) Video(cs ...Checker) *Node
- func (n *Node) Wbr(cs ...Checker) *Node
- func (n *Node) Width(pat ...string) *string
- func (n *Node) Workertype(pat ...string) *string
- func (n *Node) Wrap(pat ...string) *string
- type NodeIter
- func (i NodeIter) A(cs ...Checker) NodeIter
- func (i NodeIter) All() (nodes []*Node)
- func (i NodeIter) Div(cs ...Checker) NodeIter
- func (i NodeIter) Find(cs ...Checker) NodeIter
- func (i NodeIter) For(visit func(n *Node))
- func (i NodeIter) H2(cs ...Checker) NodeIter
- func (i NodeIter) H3(cs ...Checker) NodeIter
- func (i NodeIter) H4(cs ...Checker) NodeIter
- func (i NodeIter) Href(pat ...string) []string
- func (i NodeIter) Integers(f StringGetter) []int
- func (i NodeIter) Next() *Node
- func (i NodeIter) Strings(f StringGetter, pat ...string) []string
- func (i NodeIter) Td(cs ...Checker) NodeIter
- type NodeStack
- type TextNodeNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents a HTML node. Wrap html.Node so that chainable interface is possible Use pointer of it because we want to test with nil.
func (*Node) AcceptCharset ¶
func (*Node) Allowfullscreen ¶
func (*Node) Allowpaymentrequest ¶
func (*Node) Allowusermedia ¶
func (*Node) Autocomplete ¶
func (*Node) Blockquote ¶
func (*Node) Contenteditable ¶
func (*Node) Crossorigin ¶
func (*Node) Descendants ¶
func (*Node) Figcaption ¶
func (*Node) Formaction ¶
func (*Node) Formenctype ¶
func (*Node) Formmethod ¶
func (*Node) Formnovalidate ¶
func (*Node) Formtarget ¶
func (*Node) InternalNode ¶
func (*Node) NextSibling ¶
func (*Node) Novalidate ¶
func (*Node) Placeholder ¶
func (*Node) Playsinline ¶
func (*Node) PrettyPrint ¶
func (n *Node) PrettyPrint()
func (*Node) PrettyRender ¶
PrettyRender renders prettily the parse tree n to the given writer, for easily viewing as plain text.
func (*Node) PrevSibling ¶
func (*Node) Referrerpolicy ¶
func (*Node) RenderChildren ¶
func (*Node) RenderTagOnly ¶
func (*Node) Spellcheck ¶
func (*Node) TextNode ¶
func (n *Node) TextNode(pat string) *TextNodeNode
func (*Node) Typemustmatch ¶
func (*Node) Updateviacache ¶
func (*Node) Workertype ¶
type TextNodeNode ¶
type TextNodeNode struct { Node // contains filtered or unexported fields }
func NewTextNodeNode ¶
func NewTextNodeNode(n *Node, rx *regexp.Regexp) *TextNodeNode
func (*TextNodeNode) Submatch ¶
func (n *TextNodeNode) Submatch() *string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.