MCPcopy Create free account

hub / github.com/PuerkitoBio/goquery / functions

Functions666 in github.com/PuerkitoBio/goquery

↓ 419 callersMethodFind
Find gets the descendants of each element in the current set of matched elements, filtered by a selector. It returns a new Selection object containing
traversal.go:29
↓ 221 callersFunctionDoc
()
type_test.go:21
↓ 195 callersFunctionassertLength
(t *testing.T, nodes []*html.Node, length int)
type_test.go:64
↓ 75 callersMethodLength
Length returns the number of elements in the Selection object.
property.go:81
↓ 73 callersFunctionDocW
()
type_test.go:57
↓ 66 callersMethodEnd
End ends the most recent filtering operation in the current chain and returns the set of matched elements to its previous state.
filter.go:136
↓ 62 callersFunctionassertEqual
(t *testing.T, s1 *Selection, s2 *Selection)
type_test.go:85
↓ 57 callersFunctionDoc2Clone
()
type_test.go:35
↓ 56 callersFunctionprintSel
(t *testing.T, sel *Selection)
type_test.go:99
↓ 39 callersFunctionpushStack
Creates a new Selection object based on the specified nodes, and keeps the source Selection object on the stack (linked list).
utilities.go:240
↓ 37 callersFunctioncompileMatcher
compileMatcher compiles the selector string s and returns the corresponding Matcher. If s is an invalid selector string, it returns a Matcher that fai
type.go:166
↓ 29 callersFunctionassertSelectionIs
(t *testing.T, sel *Selection, is ...string)
type_test.go:91
↓ 29 callersFunctiongetSiblingNodes
Internal implementation of sibling nodes that return a raw slice of matches.
traversal.go:580
↓ 28 callersFunctionfilterAndPush
Filter and push filters the nodes based on a matcher, and pushes the results on the stack, with the srcSel as previous selection.
traversal.go:539
↓ 27 callersFunctionDoc2
()
type_test.go:28
↓ 20 callersFunctionNewDocumentFromReader
NewDocumentFromReader returns a Document from an io.Reader. It returns an error as second value if the reader's data cannot be parsed as html. It does
type.go:51
↓ 18 callersMethodEq
Eq reduces the set of matched elements to the one at the specified index. If a negative index is given, it counts backwards starting at the end of the
array.go:35
↓ 17 callersMethodGet
Get retrieves the underlying node at the specified index. Get without parameter is not implemented, since the node array is available on the Selection
array.go:73
↓ 14 callersFunctionDocB
()
type_test.go:50
↓ 14 callersMethodSlice
Slice reduces the set of matched elements to a subset specified by a range of indices. The start index is 0-based and indicates the index of the first
array.go:58
↓ 14 callersMethodText
Text gets the combined text contents of each element in the set of matched elements, including their descendants.
property.go:56
↓ 14 callersFunctionassertClass
(t *testing.T, sel *Selection, class string)
type_test.go:73
↓ 13 callersMethodAttr
Attr gets the specified attribute's value for the first element in the Selection. To get the value for each element individually, use a looping constr
property.go:14
↓ 12 callersFunctionnewSingleSelection
Helper constructor to create a selection of only one node
type.go:111
↓ 11 callersMethodFirst
First reduces the set of matched elements to the first in the set. It returns a new Selection object, and an empty Selection object if the the selecti
array.go:20
↓ 10 callersMethodHasClass
HasClass determines whether any of the matched elements are assigned the given class.
property.go:131
↓ 10 callersMethodLast
Last reduces the set of matched elements to the last in the set. It returns a new Selection object, and an empty Selection object if the selection is
array.go:27
↓ 10 callersMethodMatchAll
(*html.Node)
type.go:120
↓ 10 callersFunctiongetParentsNodes
Internal implementation to get all parent nodes, stopping at the specified node (or nil if no stop).
traversal.go:559
↓ 9 callersMethodAddNodes
AddNodes adds the specified nodes to those in the current selection and returns a new Selection object.
expand.go:37
↓ 9 callersMethodContains
Contains returns true if the specified Node is within, at any depth, one of the nodes in the Selection object. It is NOT inclusive, to behave like jQu
query.go:58
↓ 9 callersMethodEach
Each iterates over a Selection object, executing a function for each matched element. It returns the current Selection object. The function f is calle
iteration.go:10
↓ 9 callersMethodFilter
([]*html.Node)
type.go:121
↓ 8 callersMethodAddSelection
AddSelection adds the specified Selection object's nodes to those in the current selection and returns a new Selection object.
expand.go:23
↓ 8 callersMethodContents
Contents gets the children of each element in the Selection, including text and comment nodes. It returns a new Selection object containing these elem
traversal.go:65
↓ 8 callersMethodRemove
Remove removes the set of matched elements from the document. It returns the same selection, now consisting of nodes not in the document.
manipulation.go:235
↓ 8 callersFunctionloadString
(t *testing.T, doc string)
type_test.go:125
↓ 7 callersMethodChildrenFiltered
ChildrenFiltered gets the child elements of each element in the Selection, filtered by the specified selector. It returns a new Selection object conta
traversal.go:98
↓ 7 callersMethodClosest
Closest gets the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
traversal.go:129
↓ 7 callersMethodClosestNodes
ClosestNodes gets the first element that matches one of the nodes by testing the element itself and traversing up through its ancestors in the DOM tre
traversal.go:151
↓ 7 callersMethodHas
Has reduces the set of matched elements to those that have a descendant that matches the selector. It returns a new Selection object with the matching
filter.go:81
↓ 7 callersMethodHtml
Html gets the HTML contents of the first element in the set of matched elements. It includes text and comment nodes.
property.go:87
↓ 7 callersMethodIs
Is checks the current matched set of elements against a selector and returns true if at least one of these elements matches.
query.go:7
↓ 7 callersMethodParent
Parent gets the parent of each element in the Selection. It returns a new Selection object containing the matched elements.
traversal.go:111
↓ 7 callersMethodPrevUntil
PrevUntil gets all preceding siblings of each element up to but not including the element matched by the selector. It returns a new Selection object c
traversal.go:408
↓ 7 callersFunctionText
Text returns the combined text contents of the nodes in the selection, including their descendants, in document order. It is a package-level function
utilities.go:93
↓ 7 callersFunctionmapNodes
Internal map function used by many traversing methods. Takes the source nodes to iterate on and the mapping function that returns an array of nodes. R
traversal.go:711
↓ 6 callersMethodAddClass
AddClass adds the given class(es) to each element in the set of matched elements. Multiple class names can be specified, separated by a space or via m
property.go:107
↓ 6 callersMethodChildren
Children gets the child elements of each element in the Selection. It returns a new Selection object containing these elements.
traversal.go:91
↓ 6 callersMethodClosestSelection
ClosestSelection gets the first element that matches one of the nodes in the Selection by testing the element itself and traversing up through its anc
traversal.go:171
↓ 6 callersMethodNextAll
NextAll gets all the following siblings of each element in the Selection. It returns a new Selection object containing the matched elements.
traversal.go:313
↓ 6 callersMethodPrevAll
PrevAll gets all the preceding siblings of each element in the Selection. It returns a new Selection object containing the matched elements.
traversal.go:353
↓ 6 callersFunctionassertPanic
(t *testing.T)
type_test.go:79
↓ 6 callersMethodeachNodeHtml
eachNodeHtml parses the given html string and inserts the resulting nodes in the dom with the mergeFn. The parsed nodes are inserted for each element
manipulation.go:648
↓ 6 callersFunctionloadDoc
(page string)
type_test.go:109
↓ 6 callersMethodwrapAllNodes
(ns ...*html.Node)
manipulation.go:460
↓ 5 callersMethodFilterSelection
FilterSelection reduces the set of matched elements to those that match a node in the specified Selection object. It returns a new Selection object fo
filter.go:57
↓ 5 callersMethodMatch
(*html.Node)
type.go:119
↓ 5 callersMethodNext
Next gets the immediately following sibling of each element in the Selection. It returns a new Selection object containing the matched elements.
traversal.go:293
↓ 5 callersMethodNextAllFiltered
NextAllFiltered gets all the following siblings of each element in the Selection filtered by a selector. It returns a new Selection object containing
traversal.go:320
↓ 5 callersMethodNextFiltered
NextFiltered gets the immediately following sibling of each element in the Selection filtered by a selector. It returns a new Selection object contain
traversal.go:300
↓ 5 callersMethodNextUntil
NextUntil gets all following siblings of each element up to but not including the element matched by the selector. It returns a new Selection object c
traversal.go:374
↓ 5 callersMethodNot
Not removes elements from the Selection that match the selector string. It returns a new Selection object with the matching elements removed.
filter.go:20
↓ 5 callersMethodParents
Parents gets the ancestors of each element in the current Selection. It returns a new Selection object with the matched elements.
traversal.go:180
↓ 5 callersMethodPrev
Prev gets the immediately preceding sibling of each element in the Selection. It returns a new Selection object containing the matched elements.
traversal.go:333
↓ 5 callersMethodSetHtml
SetHtml sets the html content of each element in the selection to specified html string.
manipulation.go:318
↓ 5 callersMethodSiblings
Siblings gets the siblings of each element in the Selection. It returns a new Selection object containing the matched elements.
traversal.go:273
↓ 5 callersFunctioncloneNode
Deep copy a node. The new node has clones of all the original node's children but none of its parents or siblings.
manipulation.go:598
↓ 5 callersFunctionindexInSlice
Returns the index of the target node in the slice, or -1.
utilities.go:181
↓ 5 callersFunctionisInSlice
Checks if the target node is in the slice of nodes.
utilities.go:176
↓ 4 callersMethodAdd
Add adds the selector string's matching nodes to those in the current selection and returns a new Selection object. The selector string is run in the
expand.go:9
↓ 4 callersMethodAppendSelection
AppendSelection appends the elements in the selection to the end of each element in the set of matched elements. This follows the same rules as Selec
manipulation.go:90
↓ 4 callersMethodContentsFiltered
ContentsFiltered gets the children of each element in the Selection, filtered by the specified selector. It returns a new Selection object containing
traversal.go:74
↓ 4 callersMethodEachIter
EachIter returns an iterator that yields the Selection object in order. The implementation is similar to Each, but it returns an iterator instead.
iteration.go:19
↓ 4 callersMethodFilterMatcher
FilterMatcher reduces the set of matched elements to those that match the given matcher. It returns a new Selection object for this subset of matching
filter.go:14
↓ 4 callersMethodFindMatcher
FindMatcher gets the descendants of each element in the current set of matched elements, filtered by the matcher. It returns a new Selection object co
traversal.go:36
↓ 4 callersMethodHasNodes
HasNodes reduces the set of matched elements to those that have a descendant that matches one of the nodes. It returns a new Selection object with the
filter.go:111
↓ 4 callersMethodNextFilteredUntil
NextFilteredUntil is like NextUntil, with the option to filter the results based on a selector string. It returns a new Selection object containing th
traversal.go:442
↓ 4 callersMethodNextUntilNodes
NextUntilNodes gets all following siblings of each element up to but not including the element matched by the nodes. It returns a new Selection object
traversal.go:400
↓ 4 callersMethodParentFiltered
ParentFiltered gets the parent of each element in the Selection filtered by a selector. It returns a new Selection object containing the matched eleme
traversal.go:117
↓ 4 callersMethodParentsFiltered
ParentsFiltered gets the ancestors of each element in the current Selection. It returns a new Selection object with the matched elements.
traversal.go:186
↓ 4 callersMethodParentsFilteredUntil
ParentsFilteredUntil is like ParentsUntil, with the option to filter the results based on a selector string. It returns a new Selection object contain
traversal.go:230
↓ 4 callersMethodParentsUntil
ParentsUntil gets the ancestors of each element in the Selection, up to but not including the element matched by the selector. It returns a new Select
traversal.go:199
↓ 4 callersMethodParentsUntilNodes
ParentsUntilNodes gets the ancestors of each element in the Selection, up to but not including the specified nodes. It returns a new Selection object
traversal.go:223
↓ 4 callersMethodPrevAllFiltered
PrevAllFiltered gets all the preceding siblings of each element in the Selection filtered by a selector. It returns a new Selection object containing
traversal.go:360
↓ 4 callersMethodPrevFiltered
PrevFiltered gets the immediately preceding sibling of each element in the Selection filtered by a selector. It returns a new Selection object contain
traversal.go:340
↓ 4 callersMethodPrevFilteredUntil
PrevFilteredUntil is like PrevUntil, with the option to filter the results based on a selector string. It returns a new Selection object containing th
traversal.go:491
↓ 4 callersMethodPrevUntilNodes
PrevUntilNodes gets all preceding siblings of each element up to but not including the element matched by the nodes. It returns a new Selection object
traversal.go:434
↓ 4 callersMethodRemoveClass
RemoveClass removes the given class(es) from each element in the set of matched elements. Multiple class names can be specified, separated by a space
property.go:154
↓ 4 callersMethodSiblingsFiltered
SiblingsFiltered gets the siblings of each element in the Selection filtered by a selector. It returns a new Selection object containing the matched e
traversal.go:280
↓ 4 callersMethodUnwrap
Unwrap removes the parents of the set of matched elements, leaving the matched elements (and their siblings, if any) in their place. It returns the or
manipulation.go:340
↓ 4 callersFunctioncloneNodes
Deep copy a slice of nodes.
manipulation.go:586
↓ 4 callersFunctionfindWithMatcher
Internal implementation of Find that return raw nodes.
traversal.go:544
↓ 4 callersFunctiongetAttributePtr
(attrName string, n *html.Node)
property.go:208
↓ 4 callersFunctiongetChildrenNodes
Gets the children nodes of each node in the specified slice of nodes, based on the sibling type request.
traversal.go:603
↓ 4 callersMethodmanipulateNodes
(ns []*html.Node, reverse bool, f func(sn *html.Node, n *html.Node))
manipulation.go:614
↓ 4 callersFunctionnewDocument
Private constructor, make sure all fields are correctly filled.
type.go:89
↓ 4 callersFunctionwinnowNodes
Filter based on an array of nodes, and the indicator to keep (Filter) or to get rid of (Not) the matching elements.
filter.go:162
↓ 4 callersMethodwrapInnerNodes
(ns ...*html.Node)
manipulation.go:544
↓ 3 callersMethodAddBack
AddBack adds the previous set of elements on the stack to the current set. It returns a new Selection object containing the current Selection combined
expand.go:52
next →1–100 of 666, ranked by callers