You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3288 lines
136 KiB

8 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta name="theme-color" content="#375EAB">
  7. <title>goquery - The Go Programming Language</title>
  8. <link type="text/css" rel="stylesheet" href="../../../../lib/godoc/style.css">
  9. <link rel="stylesheet" href="../../../../lib/godoc/jquery.treeview.css">
  10. <script type="text/javascript">window.initFuncs = [];</script>
  11. </head>
  12. <body>
  13. <div id='lowframe' style="position: fixed; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;">
  14. ...
  15. </div><!-- #lowframe -->
  16. <div id="topbar" class="wide"><div class="container">
  17. <div class="top-heading" id="heading-wide"><a href="http://localhost:6060/">The Go Programming Language</a></div>
  18. <div class="top-heading" id="heading-narrow"><a href="http://localhost:6060/">Go</a></div>
  19. <a href="index.html#" id="menu-button"><span id="menu-button-arrow">&#9661;</span></a>
  20. <form method="GET" action="http://localhost:6060/search">
  21. <div id="menu">
  22. <a href="http://localhost:6060/doc/">Documents</a>
  23. <a href="http://localhost:6060/pkg/">Packages</a>
  24. <a href="http://localhost:6060/project/">The Project</a>
  25. <a href="http://localhost:6060/help/">Help</a>
  26. <a href="http://localhost:6060/blog/">Blog</a>
  27. <input type="text" id="search" name="q" class="inactive" value="Search" placeholder="Search">
  28. </div>
  29. </form>
  30. </div></div>
  31. <div id="page" class="wide">
  32. <div class="container">
  33. <h1>Package goquery</h1>
  34. <div id="nav"></div>
  35. <!--
  36. Copyright 2009 The Go Authors. All rights reserved.
  37. Use of this source code is governed by a BSD-style
  38. license that can be found in the LICENSE file.
  39. -->
  40. <!--
  41. Note: Static (i.e., not template-generated) href and id
  42. attributes start with "pkg-" to make it impossible for
  43. them to conflict with generated attributes (some of which
  44. correspond to Go identifiers).
  45. -->
  46. <script type='text/javascript'>
  47. document.ANALYSIS_DATA = null;
  48. document.CALLGRAPH = null;
  49. </script>
  50. <div id="short-nav">
  51. <dl>
  52. <dd><code>import "github.com/PuerkitoBio/goquery"</code></dd>
  53. </dl>
  54. <dl>
  55. <dd><a href="index.html#pkg-overview" class="overviewLink">Overview</a></dd>
  56. <dd><a href="index.html#pkg-index" class="indexLink">Index</a></dd>
  57. <dd><a href="index.html#pkg-examples" class="examplesLink">Examples</a></dd>
  58. </dl>
  59. </div>
  60. <!-- The package's Name is printed as title by the top-level template -->
  61. <div id="pkg-overview" class="toggleVisible">
  62. <div class="collapsed">
  63. <h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
  64. </div>
  65. <div class="expanded">
  66. <h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
  67. <p>
  68. Package goquery implements features similar to jQuery, including the chainable
  69. syntax, to manipulate and query an HTML document.
  70. </p>
  71. <p>
  72. It brings a syntax and a set of features similar to jQuery to the Go language.
  73. It is based on Go&#39;s net/html package and the CSS Selector library cascadia.
  74. Since the net/html parser returns nodes, and not a full-featured DOM
  75. tree, jQuery&#39;s stateful manipulation functions (like height(), css(), detach())
  76. have been left off.
  77. </p>
  78. <p>
  79. Also, because the net/html parser requires UTF-8 encoding, so does goquery: it is
  80. the caller&#39;s responsibility to ensure that the source document provides UTF-8 encoded HTML.
  81. See the repository&#39;s wiki for various options on how to do this.
  82. </p>
  83. <p>
  84. Syntax-wise, it is as close as possible to jQuery, with the same method names when
  85. possible, and that warm and fuzzy chainable interface. jQuery being the
  86. ultra-popular library that it is, writing a similar HTML-manipulating
  87. library was better to follow its API than to start anew (in the same spirit as
  88. Go&#39;s fmt package), even though some of its methods are less than intuitive (looking
  89. at you, index()...).
  90. </p>
  91. <p>
  92. It is hosted on GitHub, along with additional documentation in the README.md
  93. file: <a href="https://github.com/puerkitobio/goquery">https://github.com/puerkitobio/goquery</a>
  94. </p>
  95. <p>
  96. Please note that because of the net/html dependency, goquery requires Go1.1+.
  97. </p>
  98. <p>
  99. The various methods are split into files based on the category of behavior.
  100. The three dots (...) indicate that various &#34;overloads&#34; are available.
  101. </p>
  102. <p>
  103. * array.go : array-like positional manipulation of the selection.
  104. </p>
  105. <pre>- Eq()
  106. - First()
  107. - Get()
  108. - Index...()
  109. - Last()
  110. - Slice()
  111. </pre>
  112. <p>
  113. * expand.go : methods that expand or augment the selection&#39;s set.
  114. </p>
  115. <pre>- Add...()
  116. - AndSelf()
  117. - Union(), which is an alias for AddSelection()
  118. </pre>
  119. <p>
  120. * filter.go : filtering methods, that reduce the selection&#39;s set.
  121. </p>
  122. <pre>- End()
  123. - Filter...()
  124. - Has...()
  125. - Intersection(), which is an alias of FilterSelection()
  126. - Not...()
  127. </pre>
  128. <p>
  129. * iteration.go : methods to loop over the selection&#39;s nodes.
  130. </p>
  131. <pre>- Each()
  132. - EachWithBreak()
  133. - Map()
  134. </pre>
  135. <p>
  136. * manipulation.go : methods for modifying the document
  137. </p>
  138. <pre>- After...()
  139. - Append...()
  140. - Before...()
  141. - Clone()
  142. - Empty()
  143. - Prepend...()
  144. - Remove...()
  145. - ReplaceWith...()
  146. - Unwrap()
  147. - Wrap...()
  148. - WrapAll...()
  149. - WrapInner...()
  150. </pre>
  151. <p>
  152. * property.go : methods that inspect and get the node&#39;s properties values.
  153. </p>
  154. <pre>- Attr*(), RemoveAttr(), SetAttr()
  155. - AddClass(), HasClass(), RemoveClass(), ToggleClass()
  156. - Html()
  157. - Length()
  158. - Size(), which is an alias for Length()
  159. - Text()
  160. </pre>
  161. <p>
  162. * query.go : methods that query, or reflect, a node&#39;s identity.
  163. </p>
  164. <pre>- Contains()
  165. - Is...()
  166. </pre>
  167. <p>
  168. * traversal.go : methods to traverse the HTML document tree.
  169. </p>
  170. <pre>- Children...()
  171. - Contents()
  172. - Find...()
  173. - Next...()
  174. - Parent[s]...()
  175. - Prev...()
  176. - Siblings...()
  177. </pre>
  178. <p>
  179. * type.go : definition of the types exposed by goquery.
  180. </p>
  181. <pre>- Document
  182. - Selection
  183. - Matcher
  184. </pre>
  185. <p>
  186. * utilities.go : definition of helper functions (and not methods on a *Selection)
  187. that are not part of jQuery, but are useful to goquery.
  188. </p>
  189. <pre>- NodeName
  190. - OuterHtml
  191. </pre>
  192. </div>
  193. </div>
  194. <div id="example_" class="toggle">
  195. <div class="collapsed">
  196. <p class="exampleHeading toggleButton"><span class="text">Example</span></p>
  197. </div>
  198. <div class="expanded">
  199. <p class="exampleHeading toggleButton"><span class="text">Example</span></p>
  200. <p>This example scrapes the reviews shown on the home page of metalsucks.net.
  201. </p>
  202. <p>Code:</p>
  203. <pre class="code">
  204. <span class="comment">// Load the HTML document</span>
  205. doc, err := goquery.NewDocument(&#34;http://metalsucks.net&#34;)
  206. if err != nil {
  207. log.Fatal(err)
  208. }
  209. <span class="comment">// Find the review items</span>
  210. doc.Find(&#34;.sidebar-reviews article .content-block&#34;).Each(func(i int, s *goquery.Selection) {
  211. <span class="comment">// For each item found, get the band and title</span>
  212. band := s.Find(&#34;a&#34;).Text()
  213. title := s.Find(&#34;i&#34;).Text()
  214. fmt.Printf(&#34;Review %d: %s - %s\n&#34;, i, band, title)
  215. })
  216. <span class="comment">// To see the output of the Example while running the test suite (go test), simply</span>
  217. <span class="comment">// remove the leading &#34;x&#34; before Output on the next line. This will cause the</span>
  218. <span class="comment">// example to fail (all the &#34;real&#34; tests should pass).</span>
  219. <span class="comment">// xOutput: voluntarily fail the Example output.</span>
  220. </pre>
  221. </div>
  222. </div>
  223. <div id="pkg-index" class="toggleVisible">
  224. <div class="collapsed">
  225. <h2 class="toggleButton" title="Click to show Index section">Index ▹</h2>
  226. </div>
  227. <div class="expanded">
  228. <h2 class="toggleButton" title="Click to hide Index section">Index ▾</h2>
  229. <!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
  230. <div id="manual-nav">
  231. <dl>
  232. <dd><a href="index.html#NodeName">func NodeName(s *Selection) string</a></dd>
  233. <dd><a href="index.html#OuterHtml">func OuterHtml(s *Selection) (string, error)</a></dd>
  234. <dd><a href="index.html#Document">type Document</a></dd>
  235. <dd>&nbsp; &nbsp; <a href="index.html#CloneDocument">func CloneDocument(doc *Document) *Document</a></dd>
  236. <dd>&nbsp; &nbsp; <a href="index.html#NewDocument">func NewDocument(url string) (*Document, error)</a></dd>
  237. <dd>&nbsp; &nbsp; <a href="index.html#NewDocumentFromNode">func NewDocumentFromNode(root *html.Node) *Document</a></dd>
  238. <dd>&nbsp; &nbsp; <a href="index.html#NewDocumentFromReader">func NewDocumentFromReader(r io.Reader) (*Document, error)</a></dd>
  239. <dd>&nbsp; &nbsp; <a href="index.html#NewDocumentFromResponse">func NewDocumentFromResponse(res *http.Response) (*Document, error)</a></dd>
  240. <dd><a href="index.html#Matcher">type Matcher</a></dd>
  241. <dd><a href="index.html#Selection">type Selection</a></dd>
  242. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Add">func (s *Selection) Add(selector string) *Selection</a></dd>
  243. <dd>&nbsp; &nbsp; <a href="index.html#Selection.AddClass">func (s *Selection) AddClass(class ...string) *Selection</a></dd>
  244. <dd>&nbsp; &nbsp; <a href="index.html#Selection.AddMatcher">func (s *Selection) AddMatcher(m Matcher) *Selection</a></dd>
  245. <dd>&nbsp; &nbsp; <a href="index.html#Selection.AddNodes">func (s *Selection) AddNodes(nodes ...*html.Node) *Selection</a></dd>
  246. <dd>&nbsp; &nbsp; <a href="index.html#Selection.AddSelection">func (s *Selection) AddSelection(sel *Selection) *Selection</a></dd>
  247. <dd>&nbsp; &nbsp; <a href="index.html#Selection.After">func (s *Selection) After(selector string) *Selection</a></dd>
  248. <dd>&nbsp; &nbsp; <a href="index.html#Selection.AfterHtml">func (s *Selection) AfterHtml(html string) *Selection</a></dd>
  249. <dd>&nbsp; &nbsp; <a href="index.html#Selection.AfterMatcher">func (s *Selection) AfterMatcher(m Matcher) *Selection</a></dd>
  250. <dd>&nbsp; &nbsp; <a href="index.html#Selection.AfterNodes">func (s *Selection) AfterNodes(ns ...*html.Node) *Selection</a></dd>
  251. <dd>&nbsp; &nbsp; <a href="index.html#Selection.AfterSelection">func (s *Selection) AfterSelection(sel *Selection) *Selection</a></dd>
  252. <dd>&nbsp; &nbsp; <a href="index.html#Selection.AndSelf">func (s *Selection) AndSelf() *Selection</a></dd>
  253. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Append">func (s *Selection) Append(selector string) *Selection</a></dd>
  254. <dd>&nbsp; &nbsp; <a href="index.html#Selection.AppendHtml">func (s *Selection) AppendHtml(html string) *Selection</a></dd>
  255. <dd>&nbsp; &nbsp; <a href="index.html#Selection.AppendMatcher">func (s *Selection) AppendMatcher(m Matcher) *Selection</a></dd>
  256. <dd>&nbsp; &nbsp; <a href="index.html#Selection.AppendNodes">func (s *Selection) AppendNodes(ns ...*html.Node) *Selection</a></dd>
  257. <dd>&nbsp; &nbsp; <a href="index.html#Selection.AppendSelection">func (s *Selection) AppendSelection(sel *Selection) *Selection</a></dd>
  258. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Attr">func (s *Selection) Attr(attrName string) (val string, exists bool)</a></dd>
  259. <dd>&nbsp; &nbsp; <a href="index.html#Selection.AttrOr">func (s *Selection) AttrOr(attrName, defaultValue string) string</a></dd>
  260. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Before">func (s *Selection) Before(selector string) *Selection</a></dd>
  261. <dd>&nbsp; &nbsp; <a href="index.html#Selection.BeforeHtml">func (s *Selection) BeforeHtml(html string) *Selection</a></dd>
  262. <dd>&nbsp; &nbsp; <a href="index.html#Selection.BeforeMatcher">func (s *Selection) BeforeMatcher(m Matcher) *Selection</a></dd>
  263. <dd>&nbsp; &nbsp; <a href="index.html#Selection.BeforeNodes">func (s *Selection) BeforeNodes(ns ...*html.Node) *Selection</a></dd>
  264. <dd>&nbsp; &nbsp; <a href="index.html#Selection.BeforeSelection">func (s *Selection) BeforeSelection(sel *Selection) *Selection</a></dd>
  265. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Children">func (s *Selection) Children() *Selection</a></dd>
  266. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ChildrenFiltered">func (s *Selection) ChildrenFiltered(selector string) *Selection</a></dd>
  267. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ChildrenMatcher">func (s *Selection) ChildrenMatcher(m Matcher) *Selection</a></dd>
  268. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Clone">func (s *Selection) Clone() *Selection</a></dd>
  269. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Closest">func (s *Selection) Closest(selector string) *Selection</a></dd>
  270. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ClosestMatcher">func (s *Selection) ClosestMatcher(m Matcher) *Selection</a></dd>
  271. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ClosestNodes">func (s *Selection) ClosestNodes(nodes ...*html.Node) *Selection</a></dd>
  272. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ClosestSelection">func (s *Selection) ClosestSelection(sel *Selection) *Selection</a></dd>
  273. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Contains">func (s *Selection) Contains(n *html.Node) bool</a></dd>
  274. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Contents">func (s *Selection) Contents() *Selection</a></dd>
  275. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ContentsFiltered">func (s *Selection) ContentsFiltered(selector string) *Selection</a></dd>
  276. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ContentsMatcher">func (s *Selection) ContentsMatcher(m Matcher) *Selection</a></dd>
  277. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Each">func (s *Selection) Each(f func(int, *Selection)) *Selection</a></dd>
  278. <dd>&nbsp; &nbsp; <a href="index.html#Selection.EachWithBreak">func (s *Selection) EachWithBreak(f func(int, *Selection) bool) *Selection</a></dd>
  279. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Empty">func (s *Selection) Empty() *Selection</a></dd>
  280. <dd>&nbsp; &nbsp; <a href="index.html#Selection.End">func (s *Selection) End() *Selection</a></dd>
  281. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Eq">func (s *Selection) Eq(index int) *Selection</a></dd>
  282. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Filter">func (s *Selection) Filter(selector string) *Selection</a></dd>
  283. <dd>&nbsp; &nbsp; <a href="index.html#Selection.FilterFunction">func (s *Selection) FilterFunction(f func(int, *Selection) bool) *Selection</a></dd>
  284. <dd>&nbsp; &nbsp; <a href="index.html#Selection.FilterMatcher">func (s *Selection) FilterMatcher(m Matcher) *Selection</a></dd>
  285. <dd>&nbsp; &nbsp; <a href="index.html#Selection.FilterNodes">func (s *Selection) FilterNodes(nodes ...*html.Node) *Selection</a></dd>
  286. <dd>&nbsp; &nbsp; <a href="index.html#Selection.FilterSelection">func (s *Selection) FilterSelection(sel *Selection) *Selection</a></dd>
  287. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Find">func (s *Selection) Find(selector string) *Selection</a></dd>
  288. <dd>&nbsp; &nbsp; <a href="index.html#Selection.FindMatcher">func (s *Selection) FindMatcher(m Matcher) *Selection</a></dd>
  289. <dd>&nbsp; &nbsp; <a href="index.html#Selection.FindNodes">func (s *Selection) FindNodes(nodes ...*html.Node) *Selection</a></dd>
  290. <dd>&nbsp; &nbsp; <a href="index.html#Selection.FindSelection">func (s *Selection) FindSelection(sel *Selection) *Selection</a></dd>
  291. <dd>&nbsp; &nbsp; <a href="index.html#Selection.First">func (s *Selection) First() *Selection</a></dd>
  292. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Get">func (s *Selection) Get(index int) *html.Node</a></dd>
  293. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Has">func (s *Selection) Has(selector string) *Selection</a></dd>
  294. <dd>&nbsp; &nbsp; <a href="index.html#Selection.HasClass">func (s *Selection) HasClass(class string) bool</a></dd>
  295. <dd>&nbsp; &nbsp; <a href="index.html#Selection.HasMatcher">func (s *Selection) HasMatcher(m Matcher) *Selection</a></dd>
  296. <dd>&nbsp; &nbsp; <a href="index.html#Selection.HasNodes">func (s *Selection) HasNodes(nodes ...*html.Node) *Selection</a></dd>
  297. <dd>&nbsp; &nbsp; <a href="index.html#Selection.HasSelection">func (s *Selection) HasSelection(sel *Selection) *Selection</a></dd>
  298. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Html">func (s *Selection) Html() (ret string, e error)</a></dd>
  299. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Index">func (s *Selection) Index() int</a></dd>
  300. <dd>&nbsp; &nbsp; <a href="index.html#Selection.IndexMatcher">func (s *Selection) IndexMatcher(m Matcher) int</a></dd>
  301. <dd>&nbsp; &nbsp; <a href="index.html#Selection.IndexOfNode">func (s *Selection) IndexOfNode(node *html.Node) int</a></dd>
  302. <dd>&nbsp; &nbsp; <a href="index.html#Selection.IndexOfSelection">func (s *Selection) IndexOfSelection(sel *Selection) int</a></dd>
  303. <dd>&nbsp; &nbsp; <a href="index.html#Selection.IndexSelector">func (s *Selection) IndexSelector(selector string) int</a></dd>
  304. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Intersection">func (s *Selection) Intersection(sel *Selection) *Selection</a></dd>
  305. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Is">func (s *Selection) Is(selector string) bool</a></dd>
  306. <dd>&nbsp; &nbsp; <a href="index.html#Selection.IsFunction">func (s *Selection) IsFunction(f func(int, *Selection) bool) bool</a></dd>
  307. <dd>&nbsp; &nbsp; <a href="index.html#Selection.IsMatcher">func (s *Selection) IsMatcher(m Matcher) bool</a></dd>
  308. <dd>&nbsp; &nbsp; <a href="index.html#Selection.IsNodes">func (s *Selection) IsNodes(nodes ...*html.Node) bool</a></dd>
  309. <dd>&nbsp; &nbsp; <a href="index.html#Selection.IsSelection">func (s *Selection) IsSelection(sel *Selection) bool</a></dd>
  310. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Last">func (s *Selection) Last() *Selection</a></dd>
  311. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Length">func (s *Selection) Length() int</a></dd>
  312. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Map">func (s *Selection) Map(f func(int, *Selection) string) (result []string)</a></dd>
  313. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Next">func (s *Selection) Next() *Selection</a></dd>
  314. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextAll">func (s *Selection) NextAll() *Selection</a></dd>
  315. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextAllFiltered">func (s *Selection) NextAllFiltered(selector string) *Selection</a></dd>
  316. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextAllMatcher">func (s *Selection) NextAllMatcher(m Matcher) *Selection</a></dd>
  317. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextFiltered">func (s *Selection) NextFiltered(selector string) *Selection</a></dd>
  318. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextFilteredUntil">func (s *Selection) NextFilteredUntil(filterSelector, untilSelector string) *Selection</a></dd>
  319. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextFilteredUntilMatcher">func (s *Selection) NextFilteredUntilMatcher(filter, until Matcher) *Selection</a></dd>
  320. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextFilteredUntilNodes">func (s *Selection) NextFilteredUntilNodes(filterSelector string, nodes ...*html.Node) *Selection</a></dd>
  321. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextFilteredUntilSelection">func (s *Selection) NextFilteredUntilSelection(filterSelector string, sel *Selection) *Selection</a></dd>
  322. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextMatcher">func (s *Selection) NextMatcher(m Matcher) *Selection</a></dd>
  323. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextMatcherUntilNodes">func (s *Selection) NextMatcherUntilNodes(filter Matcher, nodes ...*html.Node) *Selection</a></dd>
  324. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextMatcherUntilSelection">func (s *Selection) NextMatcherUntilSelection(filter Matcher, sel *Selection) *Selection</a></dd>
  325. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextUntil">func (s *Selection) NextUntil(selector string) *Selection</a></dd>
  326. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextUntilMatcher">func (s *Selection) NextUntilMatcher(m Matcher) *Selection</a></dd>
  327. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextUntilNodes">func (s *Selection) NextUntilNodes(nodes ...*html.Node) *Selection</a></dd>
  328. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NextUntilSelection">func (s *Selection) NextUntilSelection(sel *Selection) *Selection</a></dd>
  329. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Not">func (s *Selection) Not(selector string) *Selection</a></dd>
  330. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NotFunction">func (s *Selection) NotFunction(f func(int, *Selection) bool) *Selection</a></dd>
  331. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NotMatcher">func (s *Selection) NotMatcher(m Matcher) *Selection</a></dd>
  332. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NotNodes">func (s *Selection) NotNodes(nodes ...*html.Node) *Selection</a></dd>
  333. <dd>&nbsp; &nbsp; <a href="index.html#Selection.NotSelection">func (s *Selection) NotSelection(sel *Selection) *Selection</a></dd>
  334. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Parent">func (s *Selection) Parent() *Selection</a></dd>
  335. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ParentFiltered">func (s *Selection) ParentFiltered(selector string) *Selection</a></dd>
  336. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ParentMatcher">func (s *Selection) ParentMatcher(m Matcher) *Selection</a></dd>
  337. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Parents">func (s *Selection) Parents() *Selection</a></dd>
  338. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ParentsFiltered">func (s *Selection) ParentsFiltered(selector string) *Selection</a></dd>
  339. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ParentsFilteredUntil">func (s *Selection) ParentsFilteredUntil(filterSelector, untilSelector string) *Selection</a></dd>
  340. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ParentsFilteredUntilMatcher">func (s *Selection) ParentsFilteredUntilMatcher(filter, until Matcher) *Selection</a></dd>
  341. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ParentsFilteredUntilNodes">func (s *Selection) ParentsFilteredUntilNodes(filterSelector string, nodes ...*html.Node) *Selection</a></dd>
  342. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ParentsFilteredUntilSelection">func (s *Selection) ParentsFilteredUntilSelection(filterSelector string, sel *Selection) *Selection</a></dd>
  343. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ParentsMatcher">func (s *Selection) ParentsMatcher(m Matcher) *Selection</a></dd>
  344. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ParentsMatcherUntilNodes">func (s *Selection) ParentsMatcherUntilNodes(filter Matcher, nodes ...*html.Node) *Selection</a></dd>
  345. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ParentsMatcherUntilSelection">func (s *Selection) ParentsMatcherUntilSelection(filter Matcher, sel *Selection) *Selection</a></dd>
  346. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ParentsUntil">func (s *Selection) ParentsUntil(selector string) *Selection</a></dd>
  347. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ParentsUntilMatcher">func (s *Selection) ParentsUntilMatcher(m Matcher) *Selection</a></dd>
  348. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ParentsUntilNodes">func (s *Selection) ParentsUntilNodes(nodes ...*html.Node) *Selection</a></dd>
  349. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ParentsUntilSelection">func (s *Selection) ParentsUntilSelection(sel *Selection) *Selection</a></dd>
  350. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Prepend">func (s *Selection) Prepend(selector string) *Selection</a></dd>
  351. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrependHtml">func (s *Selection) PrependHtml(html string) *Selection</a></dd>
  352. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrependMatcher">func (s *Selection) PrependMatcher(m Matcher) *Selection</a></dd>
  353. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrependNodes">func (s *Selection) PrependNodes(ns ...*html.Node) *Selection</a></dd>
  354. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrependSelection">func (s *Selection) PrependSelection(sel *Selection) *Selection</a></dd>
  355. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Prev">func (s *Selection) Prev() *Selection</a></dd>
  356. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevAll">func (s *Selection) PrevAll() *Selection</a></dd>
  357. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevAllFiltered">func (s *Selection) PrevAllFiltered(selector string) *Selection</a></dd>
  358. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevAllMatcher">func (s *Selection) PrevAllMatcher(m Matcher) *Selection</a></dd>
  359. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevFiltered">func (s *Selection) PrevFiltered(selector string) *Selection</a></dd>
  360. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevFilteredUntil">func (s *Selection) PrevFilteredUntil(filterSelector, untilSelector string) *Selection</a></dd>
  361. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevFilteredUntilMatcher">func (s *Selection) PrevFilteredUntilMatcher(filter, until Matcher) *Selection</a></dd>
  362. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevFilteredUntilNodes">func (s *Selection) PrevFilteredUntilNodes(filterSelector string, nodes ...*html.Node) *Selection</a></dd>
  363. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevFilteredUntilSelection">func (s *Selection) PrevFilteredUntilSelection(filterSelector string, sel *Selection) *Selection</a></dd>
  364. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevMatcher">func (s *Selection) PrevMatcher(m Matcher) *Selection</a></dd>
  365. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevMatcherUntilNodes">func (s *Selection) PrevMatcherUntilNodes(filter Matcher, nodes ...*html.Node) *Selection</a></dd>
  366. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevMatcherUntilSelection">func (s *Selection) PrevMatcherUntilSelection(filter Matcher, sel *Selection) *Selection</a></dd>
  367. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevUntil">func (s *Selection) PrevUntil(selector string) *Selection</a></dd>
  368. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevUntilMatcher">func (s *Selection) PrevUntilMatcher(m Matcher) *Selection</a></dd>
  369. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevUntilNodes">func (s *Selection) PrevUntilNodes(nodes ...*html.Node) *Selection</a></dd>
  370. <dd>&nbsp; &nbsp; <a href="index.html#Selection.PrevUntilSelection">func (s *Selection) PrevUntilSelection(sel *Selection) *Selection</a></dd>
  371. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Remove">func (s *Selection) Remove() *Selection</a></dd>
  372. <dd>&nbsp; &nbsp; <a href="index.html#Selection.RemoveAttr">func (s *Selection) RemoveAttr(attrName string) *Selection</a></dd>
  373. <dd>&nbsp; &nbsp; <a href="index.html#Selection.RemoveClass">func (s *Selection) RemoveClass(class ...string) *Selection</a></dd>
  374. <dd>&nbsp; &nbsp; <a href="index.html#Selection.RemoveFiltered">func (s *Selection) RemoveFiltered(selector string) *Selection</a></dd>
  375. <dd>&nbsp; &nbsp; <a href="index.html#Selection.RemoveMatcher">func (s *Selection) RemoveMatcher(m Matcher) *Selection</a></dd>
  376. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ReplaceWith">func (s *Selection) ReplaceWith(selector string) *Selection</a></dd>
  377. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ReplaceWithHtml">func (s *Selection) ReplaceWithHtml(html string) *Selection</a></dd>
  378. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ReplaceWithMatcher">func (s *Selection) ReplaceWithMatcher(m Matcher) *Selection</a></dd>
  379. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ReplaceWithNodes">func (s *Selection) ReplaceWithNodes(ns ...*html.Node) *Selection</a></dd>
  380. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ReplaceWithSelection">func (s *Selection) ReplaceWithSelection(sel *Selection) *Selection</a></dd>
  381. <dd>&nbsp; &nbsp; <a href="index.html#Selection.SetAttr">func (s *Selection) SetAttr(attrName, val string) *Selection</a></dd>
  382. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Siblings">func (s *Selection) Siblings() *Selection</a></dd>
  383. <dd>&nbsp; &nbsp; <a href="index.html#Selection.SiblingsFiltered">func (s *Selection) SiblingsFiltered(selector string) *Selection</a></dd>
  384. <dd>&nbsp; &nbsp; <a href="index.html#Selection.SiblingsMatcher">func (s *Selection) SiblingsMatcher(m Matcher) *Selection</a></dd>
  385. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Size">func (s *Selection) Size() int</a></dd>
  386. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Slice">func (s *Selection) Slice(start, end int) *Selection</a></dd>
  387. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Text">func (s *Selection) Text() string</a></dd>
  388. <dd>&nbsp; &nbsp; <a href="index.html#Selection.ToggleClass">func (s *Selection) ToggleClass(class ...string) *Selection</a></dd>
  389. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Union">func (s *Selection) Union(sel *Selection) *Selection</a></dd>
  390. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Unwrap">func (s *Selection) Unwrap() *Selection</a></dd>
  391. <dd>&nbsp; &nbsp; <a href="index.html#Selection.Wrap">func (s *Selection) Wrap(selector string) *Selection</a></dd>
  392. <dd>&nbsp; &nbsp; <a href="index.html#Selection.WrapAll">func (s *Selection) WrapAll(selector string) *Selection</a></dd>
  393. <dd>&nbsp; &nbsp; <a href="index.html#Selection.WrapAllHtml">func (s *Selection) WrapAllHtml(html string) *Selection</a></dd>
  394. <dd>&nbsp; &nbsp; <a href="index.html#Selection.WrapAllMatcher">func (s *Selection) WrapAllMatcher(m Matcher) *Selection</a></dd>
  395. <dd>&nbsp; &nbsp; <a href="index.html#Selection.WrapAllNode">func (s *Selection) WrapAllNode(n *html.Node) *Selection</a></dd>
  396. <dd>&nbsp; &nbsp; <a href="index.html#Selection.WrapAllSelection">func (s *Selection) WrapAllSelection(sel *Selection) *Selection</a></dd>
  397. <dd>&nbsp; &nbsp; <a href="index.html#Selection.WrapHtml">func (s *Selection) WrapHtml(html string) *Selection</a></dd>
  398. <dd>&nbsp; &nbsp; <a href="index.html#Selection.WrapInner">func (s *Selection) WrapInner(selector string) *Selection</a></dd>
  399. <dd>&nbsp; &nbsp; <a href="index.html#Selection.WrapInnerHtml">func (s *Selection) WrapInnerHtml(html string) *Selection</a></dd>
  400. <dd>&nbsp; &nbsp; <a href="index.html#Selection.WrapInnerMatcher">func (s *Selection) WrapInnerMatcher(m Matcher) *Selection</a></dd>
  401. <dd>&nbsp; &nbsp; <a href="index.html#Selection.WrapInnerNode">func (s *Selection) WrapInnerNode(n *html.Node) *Selection</a></dd>
  402. <dd>&nbsp; &nbsp; <a href="index.html#Selection.WrapInnerSelection">func (s *Selection) WrapInnerSelection(sel *Selection) *Selection</a></dd>
  403. <dd>&nbsp; &nbsp; <a href="index.html#Selection.WrapMatcher">func (s *Selection) WrapMatcher(m Matcher) *Selection</a></dd>
  404. <dd>&nbsp; &nbsp; <a href="index.html#Selection.WrapNode">func (s *Selection) WrapNode(n *html.Node) *Selection</a></dd>
  405. <dd>&nbsp; &nbsp; <a href="index.html#Selection.WrapSelection">func (s *Selection) WrapSelection(sel *Selection) *Selection</a></dd>
  406. </dl>
  407. </div><!-- #manual-nav -->
  408. <div id="pkg-examples">
  409. <h4>Examples</h4>
  410. <dl>
  411. <dd><a class="exampleLink" href="index.html#example_">Package</a></dd>
  412. </dl>
  413. </div>
  414. <h4>Package files</h4>
  415. <p>
  416. <span style="font-size:90%">
  417. <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/array.go">array.go</a>
  418. <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/doc.go">doc.go</a>
  419. <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/expand.go">expand.go</a>
  420. <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go">filter.go</a>
  421. <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/iteration.go">iteration.go</a>
  422. <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go">manipulation.go</a>
  423. <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/property.go">property.go</a>
  424. <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/query.go">query.go</a>
  425. <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go">traversal.go</a>
  426. <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/type.go">type.go</a>
  427. <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/utilities.go">utilities.go</a>
  428. </span>
  429. </p>
  430. </div><!-- .expanded -->
  431. </div><!-- #pkg-index -->
  432. <div id="pkg-callgraph" class="toggle" style="display: none">
  433. <div class="collapsed">
  434. <h2 class="toggleButton" title="Click to show Internal Call Graph section">Internal call graph ▹</h2>
  435. </div> <!-- .expanded -->
  436. <div class="expanded">
  437. <h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph ▾</h2>
  438. <p>
  439. In the call graph viewer below, each node
  440. is a function belonging to this package
  441. and its children are the functions it
  442. calls&mdash;perhaps dynamically.
  443. </p>
  444. <p>
  445. The root nodes are the entry points of the
  446. package: functions that may be called from
  447. outside the package.
  448. There may be non-exported or anonymous
  449. functions among them if they are called
  450. dynamically from another package.
  451. </p>
  452. <p>
  453. Click a node to visit that function's source code.
  454. From there you can visit its callers by
  455. clicking its declaring <code>func</code>
  456. token.
  457. </p>
  458. <p>
  459. Functions may be omitted if they were
  460. determined to be unreachable in the
  461. particular programs or tests that were
  462. analyzed.
  463. </p>
  464. <!-- Zero means show all package entry points. -->
  465. <ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul>
  466. </div>
  467. </div> <!-- #pkg-callgraph -->
  468. <h2 id="NodeName">func <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/utilities.go?s=982:1016#L25">NodeName</a></h2>
  469. <pre>func NodeName(s *<a href="index.html#Selection">Selection</a>) <a href="../../../builtin/index.html#string">string</a></pre>
  470. <p>
  471. NodeName returns the node name of the first element in the selection.
  472. It tries to behave in a similar way as the DOM&#39;s nodeName property
  473. (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeName">https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeName</a>).
  474. </p>
  475. <p>
  476. Go&#39;s net/html package defines the following node types, listed with
  477. the corresponding returned value from this function:
  478. </p>
  479. <pre>ErrorNode : #error
  480. TextNode : #text
  481. DocumentNode : #document
  482. ElementNode : the element&#39;s tag name
  483. CommentNode : #comment
  484. DoctypeNode : the name of the document type
  485. </pre>
  486. <h2 id="OuterHtml">func <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/utilities.go?s=1596:1640#L47">OuterHtml</a></h2>
  487. <pre>func OuterHtml(s *<a href="index.html#Selection">Selection</a>) (<a href="../../../builtin/index.html#string">string</a>, <a href="../../../builtin/index.html#error">error</a>)</pre>
  488. <p>
  489. OuterHtml returns the outer HTML rendering of the first item in
  490. the selection - that is, the HTML including the first element&#39;s
  491. tag and attributes.
  492. </p>
  493. <p>
  494. Unlike InnerHtml, this is a function and not a method on the Selection,
  495. because this is not a jQuery method (in javascript-land, this is
  496. a property provided by the DOM).
  497. </p>
  498. <h2 id="Document">type <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/type.go?s=513:589#L9">Document</a></h2>
  499. <pre>type Document struct {
  500. *<a href="index.html#Selection">Selection</a>
  501. Url *<a href="../../../net/url/index.html">url</a>.<a href="../../../net/url/index.html#URL">URL</a>
  502. <span class="comment">// contains filtered or unexported fields</span>
  503. }</pre>
  504. <p>
  505. Document represents an HTML document to be manipulated. Unlike jQuery, which
  506. is loaded as part of a DOM document, and thus acts upon its containing
  507. document, GoQuery doesn&#39;t know which HTML document to act upon. So it needs
  508. to be told, and that&#39;s what the Document class is for. It holds the root
  509. document node to manipulate, and can make selections on this document.
  510. </p>
  511. <h3 id="CloneDocument">func <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/type.go?s=2357:2400#L69">CloneDocument</a></h3>
  512. <pre>func CloneDocument(doc *<a href="index.html#Document">Document</a>) *<a href="index.html#Document">Document</a></pre>
  513. <p>
  514. CloneDocument creates a deep-clone of a document.
  515. </p>
  516. <h3 id="NewDocument">func <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/type.go?s=960:1007#L24">NewDocument</a></h3>
  517. <pre>func NewDocument(url <a href="../../../builtin/index.html#string">string</a>) (*<a href="index.html#Document">Document</a>, <a href="../../../builtin/index.html#error">error</a>)</pre>
  518. <p>
  519. NewDocument is a Document constructor that takes a string URL as argument.
  520. It loads the specified document, parses it, and stores the root Document
  521. node, ready to be manipulated.
  522. </p>
  523. <h3 id="NewDocumentFromNode">func <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/type.go?s=684:735#L17">NewDocumentFromNode</a></h3>
  524. <pre>func NewDocumentFromNode(root *<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Document">Document</a></pre>
  525. <p>
  526. NewDocumentFromNode is a Document constructor that takes a root html Node
  527. as argument.
  528. </p>
  529. <h3 id="NewDocumentFromReader">func <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/type.go?s=1461:1519#L38">NewDocumentFromReader</a></h3>
  530. <pre>func NewDocumentFromReader(r <a href="../../../io/index.html">io</a>.<a href="../../../io/index.html#Reader">Reader</a>) (*<a href="index.html#Document">Document</a>, <a href="../../../builtin/index.html#error">error</a>)</pre>
  531. <p>
  532. NewDocumentFromReader returns a Document from a generic reader.
  533. It returns an error as second value if the reader&#39;s data cannot be parsed
  534. as html. It does *not* check if the reader is also an io.Closer, so the
  535. provided reader is never closed by this call, it is the responsibility
  536. of the caller to close it if required.
  537. </p>
  538. <h3 id="NewDocumentFromResponse">func <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/type.go?s=1883:1950#L49">NewDocumentFromResponse</a></h3>
  539. <pre>func NewDocumentFromResponse(res *<a href="../../../net/http/index.html">http</a>.<a href="../../../net/http/index.html#Response">Response</a>) (*<a href="index.html#Document">Document</a>, <a href="../../../builtin/index.html#error">error</a>)</pre>
  540. <p>
  541. NewDocumentFromResponse is another Document constructor that takes an http response as argument.
  542. It loads the specified response&#39;s document, parses it, and stores the root Document
  543. node, ready to be manipulated. The response&#39;s body is closed on return.
  544. </p>
  545. <h2 id="Matcher">type <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/type.go?s=3491:3611#L103">Matcher</a></h2>
  546. <pre>type Matcher interface {
  547. Match(*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) <a href="../../../builtin/index.html#bool">bool</a>
  548. MatchAll(*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) []*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>
  549. Filter([]*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) []*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>
  550. }</pre>
  551. <p>
  552. Matcher is an interface that defines the methods to match
  553. HTML nodes against a compiled selector string. Cascadia&#39;s
  554. Selector implements this interface.
  555. </p>
  556. <h2 id="Selection">type <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/type.go?s=2918:3007#L84">Selection</a></h2>
  557. <pre>type Selection struct {
  558. Nodes []*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>
  559. <span class="comment">// contains filtered or unexported fields</span>
  560. }</pre>
  561. <p>
  562. Selection represents a collection of nodes matching some criteria. The
  563. initial Selection can be created by using Document.Find, and then
  564. manipulated using the jQuery-like chainable syntax and methods.
  565. </p>
  566. <h3 id="Selection.Add">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/expand.go?s=268:319#L1">Add</a></h3>
  567. <pre>func (s *<a href="index.html#Selection">Selection</a>) Add(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  568. <p>
  569. Add adds the selector string&#39;s matching nodes to those in the current
  570. selection and returns a new Selection object.
  571. The selector string is run in the context of the document of the current
  572. Selection object.
  573. </p>
  574. <h3 id="Selection.AddClass">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/property.go?s=2593:2649#L94">AddClass</a></h3>
  575. <pre>func (s *<a href="index.html#Selection">Selection</a>) AddClass(class ...<a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  576. <p>
  577. AddClass adds the given class(es) to each element in the set of matched elements.
  578. Multiple class names can be specified, separated by a space or via multiple arguments.
  579. </p>
  580. <h3 id="Selection.AddMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/expand.go?s=635:687#L7">AddMatcher</a></h3>
  581. <pre>func (s *<a href="index.html#Selection">Selection</a>) AddMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  582. <p>
  583. AddMatcher adds the matcher&#39;s matching nodes to those in the current
  584. selection and returns a new Selection object.
  585. The matcher is run in the context of the document of the current
  586. Selection object.
  587. </p>
  588. <h3 id="Selection.AddNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/expand.go?s=1278:1338#L27">AddNodes</a></h3>
  589. <pre>func (s *<a href="index.html#Selection">Selection</a>) AddNodes(nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  590. <p>
  591. AddNodes adds the specified nodes to those in the
  592. current selection and returns a new Selection object.
  593. </p>
  594. <h3 id="Selection.AddSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/expand.go?s=903:962#L13">AddSelection</a></h3>
  595. <pre>func (s *<a href="index.html#Selection">Selection</a>) AddSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  596. <p>
  597. AddSelection adds the specified Selection object&#39;s nodes to those in the
  598. current selection and returns a new Selection object.
  599. </p>
  600. <h3 id="Selection.After">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=417:470#L6">After</a></h3>
  601. <pre>func (s *<a href="index.html#Selection">Selection</a>) After(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  602. <p>
  603. After applies the selector from the root document and inserts the matched elements
  604. after the elements in the set of matched elements.
  605. </p>
  606. <p>
  607. If one of the matched elements in the selection is not currently in the
  608. document, it&#39;s impossible to insert nodes after it, so it will be ignored.
  609. </p>
  610. <p>
  611. This follows the same rules as Selection.Append.
  612. </p>
  613. <h3 id="Selection.AfterHtml">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=1400:1453#L32">AfterHtml</a></h3>
  614. <pre>func (s *<a href="index.html#Selection">Selection</a>) AfterHtml(html <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  615. <p>
  616. AfterHtml parses the html and inserts it after the set of matched elements.
  617. </p>
  618. <p>
  619. This follows the same rules as Selection.Append.
  620. </p>
  621. <h3 id="Selection.AfterMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=882:936#L17">AfterMatcher</a></h3>
  622. <pre>func (s *<a href="index.html#Selection">Selection</a>) AfterMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  623. <p>
  624. AfterMatcher applies the matcher from the root document and inserts the matched elements
  625. after the elements in the set of matched elements.
  626. </p>
  627. <p>
  628. If one of the matched elements in the selection is not currently in the
  629. document, it&#39;s impossible to insert nodes after it, so it will be ignored.
  630. </p>
  631. <p>
  632. This follows the same rules as Selection.Append.
  633. </p>
  634. <h3 id="Selection.AfterNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=1638:1697#L39">AfterNodes</a></h3>
  635. <pre>func (s *<a href="index.html#Selection">Selection</a>) AfterNodes(ns ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  636. <p>
  637. AfterNodes inserts the nodes after each element in the set of matched elements.
  638. </p>
  639. <p>
  640. This follows the same rules as Selection.Append.
  641. </p>
  642. <h3 id="Selection.AfterSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=1164:1225#L25">AfterSelection</a></h3>
  643. <pre>func (s *<a href="index.html#Selection">Selection</a>) AfterSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  644. <p>
  645. AfterSelection inserts the elements in the selection after each element in the set of matched
  646. elements.
  647. </p>
  648. <p>
  649. This follows the same rules as Selection.Append.
  650. </p>
  651. <h3 id="Selection.AndSelf">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/expand.go?s=1594:1634#L34">AndSelf</a></h3>
  652. <pre>func (s *<a href="index.html#Selection">Selection</a>) AndSelf() *<a href="index.html#Selection">Selection</a></pre>
  653. <p>
  654. AndSelf adds the previous set of elements on the stack to the current set.
  655. It returns a new Selection object containing the current Selection combined
  656. with the previous one.
  657. </p>
  658. <h3 id="Selection.Append">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=2305:2359#L57">Append</a></h3>
  659. <pre>func (s *<a href="index.html#Selection">Selection</a>) Append(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  660. <p>
  661. Append appends the elements specified by the selector to the end of each element
  662. in the set of matched elements, following those rules:
  663. </p>
  664. <p>
  665. 1) The selector is applied to the root document.
  666. </p>
  667. <p>
  668. 2) Elements that are part of the document will be moved to the new location.
  669. </p>
  670. <p>
  671. 3) If there are multiple locations to append to, cloned nodes will be
  672. appended to all target locations except the last one, which will be moved
  673. as noted in (2).
  674. </p>
  675. <h3 id="Selection.AppendHtml">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=3069:3123#L78">AppendHtml</a></h3>
  676. <pre>func (s *<a href="index.html#Selection">Selection</a>) AppendHtml(html <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  677. <p>
  678. AppendHtml parses the html and appends it to the set of matched elements.
  679. </p>
  680. <h3 id="Selection.AppendMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=2595:2650#L65">AppendMatcher</a></h3>
  681. <pre>func (s *<a href="index.html#Selection">Selection</a>) AppendMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  682. <p>
  683. AppendMatcher appends the elements specified by the matcher to the end of each element
  684. in the set of matched elements.
  685. </p>
  686. <p>
  687. This follows the same rules as Selection.Append.
  688. </p>
  689. <h3 id="Selection.AppendNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=3314:3374#L85">AppendNodes</a></h3>
  690. <pre>func (s *<a href="index.html#Selection">Selection</a>) AppendNodes(ns ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  691. <p>
  692. AppendNodes appends the specified nodes to each node in the set of matched elements.
  693. </p>
  694. <p>
  695. This follows the same rules as Selection.Append.
  696. </p>
  697. <h3 id="Selection.AppendSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=2888:2950#L73">AppendSelection</a></h3>
  698. <pre>func (s *<a href="index.html#Selection">Selection</a>) AppendSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  699. <p>
  700. AppendSelection appends the elements in the selection to the end of each element
  701. in the set of matched elements.
  702. </p>
  703. <p>
  704. This follows the same rules as Selection.Append.
  705. </p>
  706. <h3 id="Selection.Attr">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/property.go?s=326:393#L6">Attr</a></h3>
  707. <pre>func (s *<a href="index.html#Selection">Selection</a>) Attr(attrName <a href="../../../builtin/index.html#string">string</a>) (val <a href="../../../builtin/index.html#string">string</a>, exists <a href="../../../builtin/index.html#bool">bool</a>)</pre>
  708. <p>
  709. Attr gets the specified attribute&#39;s value for the first element in the
  710. Selection. To get the value for each element individually, use a looping
  711. construct such as Each or Map method.
  712. </p>
  713. <h3 id="Selection.AttrOr">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/property.go?s=564:628#L14">AttrOr</a></h3>
  714. <pre>func (s *<a href="index.html#Selection">Selection</a>) AttrOr(attrName, defaultValue <a href="../../../builtin/index.html#string">string</a>) <a href="../../../builtin/index.html#string">string</a></pre>
  715. <p>
  716. AttrOr works like Attr but returns default value if attribute is not present.
  717. </p>
  718. <h3 id="Selection.Before">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=3623:3677#L94">Before</a></h3>
  719. <pre>func (s *<a href="index.html#Selection">Selection</a>) Before(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  720. <p>
  721. Before inserts the matched elements before each element in the set of matched elements.
  722. </p>
  723. <p>
  724. This follows the same rules as Selection.Append.
  725. </p>
  726. <h3 id="Selection.BeforeHtml">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=4412:4466#L116">BeforeHtml</a></h3>
  727. <pre>func (s *<a href="index.html#Selection">Selection</a>) BeforeHtml(html <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  728. <p>
  729. BeforeHtml parses the html and inserts it before the set of matched elements.
  730. </p>
  731. <p>
  732. This follows the same rules as Selection.Append.
  733. </p>
  734. <h3 id="Selection.BeforeMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=3886:3941#L101">BeforeMatcher</a></h3>
  735. <pre>func (s *<a href="index.html#Selection">Selection</a>) BeforeMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  736. <p>
  737. BeforeMatcher inserts the matched elements before each element in the set of matched elements.
  738. </p>
  739. <p>
  740. This follows the same rules as Selection.Append.
  741. </p>
  742. <h3 id="Selection.BeforeNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=4654:4714#L123">BeforeNodes</a></h3>
  743. <pre>func (s *<a href="index.html#Selection">Selection</a>) BeforeNodes(ns ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  744. <p>
  745. BeforeNodes inserts the nodes before each element in the set of matched elements.
  746. </p>
  747. <p>
  748. This follows the same rules as Selection.Append.
  749. </p>
  750. <h3 id="Selection.BeforeSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=4172:4234#L109">BeforeSelection</a></h3>
  751. <pre>func (s *<a href="index.html#Selection">Selection</a>) BeforeSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  752. <p>
  753. BeforeSelection inserts the elements in the selection before each element in the set of matched
  754. elements.
  755. </p>
  756. <p>
  757. This follows the same rules as Selection.Append.
  758. </p>
  759. <h3 id="Selection.Children">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=2996:3037#L75">Children</a></h3>
  760. <pre>func (s *<a href="index.html#Selection">Selection</a>) Children() *<a href="index.html#Selection">Selection</a></pre>
  761. <p>
  762. Children gets the child elements of each element in the Selection.
  763. It returns a new Selection object containing these elements.
  764. </p>
  765. <h3 id="Selection.ChildrenFiltered">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=3284:3348#L82">ChildrenFiltered</a></h3>
  766. <pre>func (s *<a href="index.html#Selection">Selection</a>) ChildrenFiltered(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  767. <p>
  768. ChildrenFiltered gets the child elements of each element in the Selection,
  769. filtered by the specified selector. It returns a new
  770. Selection object containing these elements.
  771. </p>
  772. <h3 id="Selection.ChildrenMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=3623:3680#L89">ChildrenMatcher</a></h3>
  773. <pre>func (s *<a href="index.html#Selection">Selection</a>) ChildrenMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  774. <p>
  775. ChildrenMatcher gets the child elements of each element in the Selection,
  776. filtered by the specified matcher. It returns a new
  777. Selection object containing these elements.
  778. </p>
  779. <h3 id="Selection.Clone">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=4971:5009#L133">Clone</a></h3>
  780. <pre>func (s *<a href="index.html#Selection">Selection</a>) Clone() *<a href="index.html#Selection">Selection</a></pre>
  781. <p>
  782. Clone creates a deep copy of the set of matched nodes. The new nodes will not be
  783. attached to the document.
  784. </p>
  785. <h3 id="Selection.Closest">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=4702:4757#L113">Closest</a></h3>
  786. <pre>func (s *<a href="index.html#Selection">Selection</a>) Closest(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  787. <p>
  788. Closest gets the first element that matches the selector by testing the
  789. element itself and traversing up through its ancestors in the DOM tree.
  790. </p>
  791. <h3 id="Selection.ClosestMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=4980:5036#L120">ClosestMatcher</a></h3>
  792. <pre>func (s *<a href="index.html#Selection">Selection</a>) ClosestMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  793. <p>
  794. ClosestMatcher gets the first element that matches the matcher by testing the
  795. element itself and traversing up through its ancestors in the DOM tree.
  796. </p>
  797. <h3 id="Selection.ClosestNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=5492:5556#L135">ClosestNodes</a></h3>
  798. <pre>func (s *<a href="index.html#Selection">Selection</a>) ClosestNodes(nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  799. <p>
  800. ClosestNodes gets the first element that matches one of the nodes by testing the
  801. element itself and traversing up through its ancestors in the DOM tree.
  802. </p>
  803. <h3 id="Selection.ClosestSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=6112:6175#L155">ClosestSelection</a></h3>
  804. <pre>func (s *<a href="index.html#Selection">Selection</a>) ClosestSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  805. <p>
  806. ClosestSelection gets the first element that matches one of the nodes in the
  807. Selection by testing the element itself and traversing up through its ancestors
  808. in the DOM tree.
  809. </p>
  810. <h3 id="Selection.Contains">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/query.go?s=1686:1733#L41">Contains</a></h3>
  811. <pre>func (s *<a href="index.html#Selection">Selection</a>) Contains(n *<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) <a href="../../../builtin/index.html#bool">bool</a></pre>
  812. <p>
  813. Contains returns true if the specified Node is within,
  814. at any depth, one of the nodes in the Selection object.
  815. It is NOT inclusive, to behave like jQuery&#39;s implementation, and
  816. unlike Javascript&#39;s .contains, so if the contained
  817. node is itself in the selection, it returns false.
  818. </p>
  819. <h3 id="Selection.Contents">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=1884:1925#L49">Contents</a></h3>
  820. <pre>func (s *<a href="index.html#Selection">Selection</a>) Contents() *<a href="index.html#Selection">Selection</a></pre>
  821. <p>
  822. Contents gets the children of each element in the Selection,
  823. including text and comment nodes. It returns a new Selection object
  824. containing these elements.
  825. </p>
  826. <h3 id="Selection.ContentsFiltered">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=2353:2417#L58">ContentsFiltered</a></h3>
  827. <pre>func (s *<a href="index.html#Selection">Selection</a>) ContentsFiltered(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  828. <p>
  829. ContentsFiltered gets the children of each element in the Selection,
  830. filtered by the specified selector. It returns a new Selection
  831. object containing these elements. Since selectors only act on Element nodes,
  832. this function is an alias to ChildrenFiltered unless the selector is empty,
  833. in which case it is an alias to Contents.
  834. </p>
  835. <h3 id="Selection.ContentsMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=2770:2827#L69">ContentsMatcher</a></h3>
  836. <pre>func (s *<a href="index.html#Selection">Selection</a>) ContentsMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  837. <p>
  838. ContentsMatcher gets the children of each element in the Selection,
  839. filtered by the specified matcher. It returns a new Selection
  840. object containing these elements. Since matchers only act on Element nodes,
  841. this function is an alias to ChildrenMatcher.
  842. </p>
  843. <h3 id="Selection.Each">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/iteration.go?s=331:391#L1">Each</a></h3>
  844. <pre>func (s *<a href="index.html#Selection">Selection</a>) Each(f func(<a href="../../../builtin/index.html#int">int</a>, *<a href="index.html#Selection">Selection</a>)) *<a href="index.html#Selection">Selection</a></pre>
  845. <p>
  846. Each iterates over a Selection object, executing a function for each
  847. matched element. It returns the current Selection object. The function
  848. f is called for each element in the selection with the index of the
  849. element in that selection starting at 0, and a *Selection that contains
  850. only that element.
  851. </p>
  852. <h3 id="Selection.EachWithBreak">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/iteration.go?s=750:824#L9">EachWithBreak</a></h3>
  853. <pre>func (s *<a href="index.html#Selection">Selection</a>) EachWithBreak(f func(<a href="../../../builtin/index.html#int">int</a>, *<a href="index.html#Selection">Selection</a>) <a href="../../../builtin/index.html#bool">bool</a>) *<a href="index.html#Selection">Selection</a></pre>
  854. <p>
  855. EachWithBreak iterates over a Selection object, executing a function for each
  856. matched element. It is identical to Each except that it is possible to break
  857. out of the loop by returning false in the callback function. It returns the
  858. current Selection object.
  859. </p>
  860. <h3 id="Selection.Empty">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=5218:5256#L141">Empty</a></h3>
  861. <pre>func (s *<a href="index.html#Selection">Selection</a>) Empty() *<a href="index.html#Selection">Selection</a></pre>
  862. <p>
  863. Empty removes all children nodes from the set of matched elements.
  864. It returns the children nodes in a new Selection.
  865. </p>
  866. <h3 id="Selection.End">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=4621:4657#L109">End</a></h3>
  867. <pre>func (s *<a href="index.html#Selection">Selection</a>) End() *<a href="index.html#Selection">Selection</a></pre>
  868. <p>
  869. End ends the most recent filtering operation in the current chain and
  870. returns the set of matched elements to its previous state.
  871. </p>
  872. <h3 id="Selection.Eq">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/array.go?s=770:814#L15">Eq</a></h3>
  873. <pre>func (s *<a href="index.html#Selection">Selection</a>) Eq(index <a href="../../../builtin/index.html#int">int</a>) *<a href="index.html#Selection">Selection</a></pre>
  874. <p>
  875. Eq reduces the set of matched elements to the one at the specified index.
  876. If a negative index is given, it counts backwards starting at the end of the
  877. set. It returns a new Selection object, and an empty Selection object if the
  878. index is invalid.
  879. </p>
  880. <h3 id="Selection.Filter">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=211:265#L1">Filter</a></h3>
  881. <pre>func (s *<a href="index.html#Selection">Selection</a>) Filter(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  882. <p>
  883. Filter reduces the set of matched elements to those that match the selector string.
  884. It returns a new Selection object for this subset of matching elements.
  885. </p>
  886. <h3 id="Selection.FilterFunction">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=1258:1333#L22">FilterFunction</a></h3>
  887. <pre>func (s *<a href="index.html#Selection">Selection</a>) FilterFunction(f func(<a href="../../../builtin/index.html#int">int</a>, *<a href="index.html#Selection">Selection</a>) <a href="../../../builtin/index.html#bool">bool</a>) *<a href="index.html#Selection">Selection</a></pre>
  888. <p>
  889. FilterFunction reduces the set of matched elements to those that pass the function&#39;s test.
  890. It returns a new Selection object for this subset of elements.
  891. </p>
  892. <h3 id="Selection.FilterMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=491:546#L4">FilterMatcher</a></h3>
  893. <pre>func (s *<a href="index.html#Selection">Selection</a>) FilterMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  894. <p>
  895. FilterMatcher reduces the set of matched elements to those that match
  896. the given matcher. It returns a new Selection object for this subset
  897. of matching elements.
  898. </p>
  899. <h3 id="Selection.FilterNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=1829:1892#L34">FilterNodes</a></h3>
  900. <pre>func (s *<a href="index.html#Selection">Selection</a>) FilterNodes(nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  901. <p>
  902. FilterNodes reduces the set of matched elements to those that match the specified nodes.
  903. It returns a new Selection object for this subset of elements.
  904. </p>
  905. <h3 id="Selection.FilterSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=2404:2466#L47">FilterSelection</a></h3>
  906. <pre>func (s *<a href="index.html#Selection">Selection</a>) FilterSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  907. <p>
  908. FilterSelection reduces the set of matched elements to those that match a
  909. node in the specified Selection object.
  910. It returns a new Selection object for this subset of elements.
  911. </p>
  912. <h3 id="Selection.Find">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=559:611#L13">Find</a></h3>
  913. <pre>func (s *<a href="index.html#Selection">Selection</a>) Find(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  914. <p>
  915. Find gets the descendants of each element in the current set of matched
  916. elements, filtered by a selector. It returns a new Selection object
  917. containing these matched elements.
  918. </p>
  919. <h3 id="Selection.FindMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=882:935#L20">FindMatcher</a></h3>
  920. <pre>func (s *<a href="index.html#Selection">Selection</a>) FindMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  921. <p>
  922. FindMatcher gets the descendants of each element in the current set of matched
  923. elements, filtered by the matcher. It returns a new Selection object
  924. containing these matched elements.
  925. </p>
  926. <h3 id="Selection.FindNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=1493:1554#L37">FindNodes</a></h3>
  927. <pre>func (s *<a href="index.html#Selection">Selection</a>) FindNodes(nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  928. <p>
  929. FindNodes gets the descendants of each element in the current
  930. Selection, filtered by some nodes. It returns a new Selection object
  931. containing these matched elements.
  932. </p>
  933. <h3 id="Selection.FindSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=1171:1231#L27">FindSelection</a></h3>
  934. <pre>func (s *<a href="index.html#Selection">Selection</a>) FindSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  935. <p>
  936. FindSelection gets the descendants of each element in the current
  937. Selection, filtered by a Selection. It returns a new Selection object
  938. containing these matched elements.
  939. </p>
  940. <h3 id="Selection.First">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/array.go?s=226:264#L1">First</a></h3>
  941. <pre>func (s *<a href="index.html#Selection">Selection</a>) First() *<a href="index.html#Selection">Selection</a></pre>
  942. <p>
  943. First reduces the set of matched elements to the first in the set.
  944. It returns a new Selection object, and an empty Selection object if the
  945. the selection is empty.
  946. </p>
  947. <h3 id="Selection.Get">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/array.go?s=1422:1467#L42">Get</a></h3>
  948. <pre>func (s *<a href="index.html#Selection">Selection</a>) Get(index <a href="../../../builtin/index.html#int">int</a>) *<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a></pre>
  949. <p>
  950. Get retrieves the underlying node at the specified index.
  951. Get without parameter is not implemented, since the node array is available
  952. on the Selection object.
  953. </p>
  954. <h3 id="Selection.Has">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=3278:3329#L71">Has</a></h3>
  955. <pre>func (s *<a href="index.html#Selection">Selection</a>) Has(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  956. <p>
  957. Has reduces the set of matched elements to those that have a descendant
  958. that matches the selector.
  959. It returns a new Selection object with the matching elements.
  960. </p>
  961. <h3 id="Selection.HasClass">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/property.go?s=3135:3182#L118">HasClass</a></h3>
  962. <pre>func (s *<a href="index.html#Selection">Selection</a>) HasClass(class <a href="../../../builtin/index.html#string">string</a>) <a href="../../../builtin/index.html#bool">bool</a></pre>
  963. <p>
  964. HasClass determines whether any of the matched elements are assigned the
  965. given class.
  966. </p>
  967. <h3 id="Selection.HasMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=3561:3613#L78">HasMatcher</a></h3>
  968. <pre>func (s *<a href="index.html#Selection">Selection</a>) HasMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  969. <p>
  970. HasMatcher reduces the set of matched elements to those that have a descendant
  971. that matches the matcher.
  972. It returns a new Selection object with the matching elements.
  973. </p>
  974. <h3 id="Selection.HasNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=3848:3908#L85">HasNodes</a></h3>
  975. <pre>func (s *<a href="index.html#Selection">Selection</a>) HasNodes(nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  976. <p>
  977. HasNodes reduces the set of matched elements to those that have a
  978. descendant that matches one of the nodes.
  979. It returns a new Selection object with the matching elements.
  980. </p>
  981. <h3 id="Selection.HasSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=4346:4405#L100">HasSelection</a></h3>
  982. <pre>func (s *<a href="index.html#Selection">Selection</a>) HasSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  983. <p>
  984. HasSelection reduces the set of matched elements to those that have a
  985. descendant that matches one of the nodes of the specified Selection object.
  986. It returns a new Selection object with the matching elements.
  987. </p>
  988. <h3 id="Selection.Html">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/property.go?s=2048:2096#L74">Html</a></h3>
  989. <pre>func (s *<a href="index.html#Selection">Selection</a>) Html() (ret <a href="../../../builtin/index.html#string">string</a>, e <a href="../../../builtin/index.html#error">error</a>)</pre>
  990. <p>
  991. Html gets the HTML contents of the first element in the set of matched
  992. elements. It includes text and comment nodes.
  993. </p>
  994. <h3 id="Selection.Index">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/array.go?s=1691:1722#L51">Index</a></h3>
  995. <pre>func (s *<a href="index.html#Selection">Selection</a>) Index() <a href="../../../builtin/index.html#int">int</a></pre>
  996. <p>
  997. Index returns the position of the first element within the Selection object
  998. relative to its sibling elements.
  999. </p>
  1000. <h3 id="Selection.IndexMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/array.go?s=2337:2384#L72">IndexMatcher</a></h3>
  1001. <pre>func (s *<a href="index.html#Selection">Selection</a>) IndexMatcher(m <a href="index.html#Matcher">Matcher</a>) <a href="../../../builtin/index.html#int">int</a></pre>
  1002. <p>
  1003. IndexMatcher returns the position of the first element within the
  1004. Selection object relative to the elements matched by the matcher, or -1 if
  1005. not found.
  1006. </p>
  1007. <h3 id="Selection.IndexOfNode">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/array.go?s=2617:2669#L82">IndexOfNode</a></h3>
  1008. <pre>func (s *<a href="index.html#Selection">Selection</a>) IndexOfNode(node *<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) <a href="../../../builtin/index.html#int">int</a></pre>
  1009. <p>
  1010. IndexOfNode returns the position of the specified node within the Selection
  1011. object, or -1 if not found.
  1012. </p>
  1013. <h3 id="Selection.IndexOfSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/array.go?s=2857:2913#L88">IndexOfSelection</a></h3>
  1014. <pre>func (s *<a href="index.html#Selection">Selection</a>) IndexOfSelection(sel *<a href="index.html#Selection">Selection</a>) <a href="../../../builtin/index.html#int">int</a></pre>
  1015. <p>
  1016. IndexOfSelection returns the position of the first node in the specified
  1017. Selection object within this Selection object, or -1 if not found.
  1018. </p>
  1019. <h3 id="Selection.IndexSelector">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/array.go?s=1999:2053#L61">IndexSelector</a></h3>
  1020. <pre>func (s *<a href="index.html#Selection">Selection</a>) IndexSelector(selector <a href="../../../builtin/index.html#string">string</a>) <a href="../../../builtin/index.html#int">int</a></pre>
  1021. <p>
  1022. IndexSelector returns the position of the first element within the
  1023. Selection object relative to the elements matched by the selector, or -1 if
  1024. not found.
  1025. </p>
  1026. <h3 id="Selection.Intersection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=3012:3071#L64">Intersection</a></h3>
  1027. <pre>func (s *<a href="index.html#Selection">Selection</a>) Intersection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1028. <p>
  1029. Intersection is an alias for FilterSelection.
  1030. </p>
  1031. <h3 id="Selection.Is">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/query.go?s=180:224#L1">Is</a></h3>
  1032. <pre>func (s *<a href="index.html#Selection">Selection</a>) Is(selector <a href="../../../builtin/index.html#string">string</a>) <a href="../../../builtin/index.html#bool">bool</a></pre>
  1033. <p>
  1034. Is checks the current matched set of elements against a selector and
  1035. returns true if at least one of these elements matches.
  1036. </p>
  1037. <h3 id="Selection.IsFunction">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/query.go?s=782:847#L20">IsFunction</a></h3>
  1038. <pre>func (s *<a href="index.html#Selection">Selection</a>) IsFunction(f func(<a href="../../../builtin/index.html#int">int</a>, *<a href="index.html#Selection">Selection</a>) <a href="../../../builtin/index.html#bool">bool</a>) <a href="../../../builtin/index.html#bool">bool</a></pre>
  1039. <p>
  1040. IsFunction checks the current matched set of elements against a predicate and
  1041. returns true if at least one of these elements matches.
  1042. </p>
  1043. <h3 id="Selection.IsMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/query.go?s=455:500#L7">IsMatcher</a></h3>
  1044. <pre>func (s *<a href="index.html#Selection">Selection</a>) IsMatcher(m <a href="index.html#Matcher">Matcher</a>) <a href="../../../builtin/index.html#bool">bool</a></pre>
  1045. <p>
  1046. IsMatcher checks the current matched set of elements against a matcher and
  1047. returns true if at least one of these elements matches.
  1048. </p>
  1049. <h3 id="Selection.IsNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/query.go?s=1289:1342#L32">IsNodes</a></h3>
  1050. <pre>func (s *<a href="index.html#Selection">Selection</a>) IsNodes(nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) <a href="../../../builtin/index.html#bool">bool</a></pre>
  1051. <p>
  1052. IsNodes checks the current matched set of elements against the specified nodes
  1053. and returns true if at least one of these elements matches.
  1054. </p>
  1055. <h3 id="Selection.IsSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/query.go?s=1042:1094#L26">IsSelection</a></h3>
  1056. <pre>func (s *<a href="index.html#Selection">Selection</a>) IsSelection(sel *<a href="index.html#Selection">Selection</a>) <a href="../../../builtin/index.html#bool">bool</a></pre>
  1057. <p>
  1058. IsSelection checks the current matched set of elements against a Selection object
  1059. and returns true if at least one of these elements matches.
  1060. </p>
  1061. <h3 id="Selection.Last">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/array.go?s=452:489#L7">Last</a></h3>
  1062. <pre>func (s *<a href="index.html#Selection">Selection</a>) Last() *<a href="index.html#Selection">Selection</a></pre>
  1063. <p>
  1064. Last reduces the set of matched elements to the last in the set.
  1065. It returns a new Selection object, and an empty Selection object if
  1066. the selection is empty.
  1067. </p>
  1068. <h3 id="Selection.Length">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/property.go?s=1866:1898#L68">Length</a></h3>
  1069. <pre>func (s *<a href="index.html#Selection">Selection</a>) Length() <a href="../../../builtin/index.html#int">int</a></pre>
  1070. <p>
  1071. Length returns the number of elements in the Selection object.
  1072. </p>
  1073. <h3 id="Selection.Map">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/iteration.go?s=1251:1324#L23">Map</a></h3>
  1074. <pre>func (s *<a href="index.html#Selection">Selection</a>) Map(f func(<a href="../../../builtin/index.html#int">int</a>, *<a href="index.html#Selection">Selection</a>) <a href="../../../builtin/index.html#string">string</a>) (result []<a href="../../../builtin/index.html#string">string</a>)</pre>
  1075. <p>
  1076. Map passes each element in the current matched set through a function,
  1077. producing a slice of string holding the returned values. The function
  1078. f is called for each element in the selection with the index of the
  1079. element in that selection starting at 0, and a *Selection that contains
  1080. only that element.
  1081. </p>
  1082. <h3 id="Selection.Next">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=11775:11812#L277">Next</a></h3>
  1083. <pre>func (s *<a href="index.html#Selection">Selection</a>) Next() *<a href="index.html#Selection">Selection</a></pre>
  1084. <p>
  1085. Next gets the immediately following sibling of each element in the
  1086. Selection. It returns a new Selection object containing the matched elements.
  1087. </p>
  1088. <h3 id="Selection.NextAll">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=12705:12745#L297">NextAll</a></h3>
  1089. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextAll() *<a href="index.html#Selection">Selection</a></pre>
  1090. <p>
  1091. NextAll gets all the following siblings of each element in the
  1092. Selection. It returns a new Selection object containing the matched elements.
  1093. </p>
  1094. <h3 id="Selection.NextAllFiltered">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=13005:13068#L304">NextAllFiltered</a></h3>
  1095. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextAllFiltered(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1096. <p>
  1097. NextAllFiltered gets all the following siblings of each element in the
  1098. Selection filtered by a selector. It returns a new Selection object
  1099. containing the matched elements.
  1100. </p>
  1101. <h3 id="Selection.NextAllMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=13356:13412#L311">NextAllMatcher</a></h3>
  1102. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextAllMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1103. <p>
  1104. NextAllMatcher gets all the following siblings of each element in the
  1105. Selection filtered by a matcher. It returns a new Selection object
  1106. containing the matched elements.
  1107. </p>
  1108. <h3 id="Selection.NextFiltered">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=12073:12133#L284">NextFiltered</a></h3>
  1109. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextFiltered(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1110. <p>
  1111. NextFiltered gets the immediately following sibling of each element in the
  1112. Selection filtered by a selector. It returns a new Selection object
  1113. containing the matched elements.
  1114. </p>
  1115. <h3 id="Selection.NextFilteredUntil">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=18319:18405#L426">NextFilteredUntil</a></h3>
  1116. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextFilteredUntil(filterSelector, untilSelector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1117. <p>
  1118. NextFilteredUntil is like NextUntil, with the option to filter
  1119. the results based on a selector string.
  1120. It returns a new Selection object containing the matched elements.
  1121. </p>
  1122. <h3 id="Selection.NextFilteredUntilMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=18735:18813#L434">NextFilteredUntilMatcher</a></h3>
  1123. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextFilteredUntilMatcher(filter, until <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1124. <p>
  1125. NextFilteredUntilMatcher is like NextUntilMatcher, with the option to filter
  1126. the results based on a matcher.
  1127. It returns a new Selection object containing the matched elements.
  1128. </p>
  1129. <h3 id="Selection.NextFilteredUntilNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=19858:19955#L459">NextFilteredUntilNodes</a></h3>
  1130. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextFilteredUntilNodes(filterSelector <a href="../../../builtin/index.html#string">string</a>, nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1131. <p>
  1132. NextFilteredUntilNodes is like NextUntilNodes, with the
  1133. option to filter the results based on a selector string. It returns a new
  1134. Selection object containing the matched elements.
  1135. </p>
  1136. <h3 id="Selection.NextFilteredUntilSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=19107:19203#L442">NextFilteredUntilSelection</a></h3>
  1137. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextFilteredUntilSelection(filterSelector <a href="../../../builtin/index.html#string">string</a>, sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1138. <p>
  1139. NextFilteredUntilSelection is like NextUntilSelection, with the
  1140. option to filter the results based on a selector string. It returns a new
  1141. Selection object containing the matched elements.
  1142. </p>
  1143. <h3 id="Selection.NextMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=12422:12475#L291">NextMatcher</a></h3>
  1144. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1145. <p>
  1146. NextMatcher gets the immediately following sibling of each element in the
  1147. Selection filtered by a matcher. It returns a new Selection object
  1148. containing the matched elements.
  1149. </p>
  1150. <h3 id="Selection.NextMatcherUntilNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=20256:20345#L467">NextMatcherUntilNodes</a></h3>
  1151. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextMatcherUntilNodes(filter <a href="index.html#Matcher">Matcher</a>, nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1152. <p>
  1153. NextMatcherUntilNodes is like NextUntilNodes, with the
  1154. option to filter the results based on a matcher. It returns a new
  1155. Selection object containing the matched elements.
  1156. </p>
  1157. <h3 id="Selection.NextMatcherUntilSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=19470:19558#L449">NextMatcherUntilSelection</a></h3>
  1158. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextMatcherUntilSelection(filter <a href="index.html#Matcher">Matcher</a>, sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1159. <p>
  1160. NextMatcherUntilSelection is like NextUntilSelection, with the
  1161. option to filter the results based on a matcher. It returns a new
  1162. Selection object containing the matched elements.
  1163. </p>
  1164. <h3 id="Selection.NextUntil">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=15563:15620#L358">NextUntil</a></h3>
  1165. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextUntil(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1166. <p>
  1167. NextUntil gets all following siblings of each element up to but not
  1168. including the element matched by the selector. It returns a new Selection
  1169. object containing the matched elements.
  1170. </p>
  1171. <h3 id="Selection.NextUntilMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=15921:15979#L366">NextUntilMatcher</a></h3>
  1172. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextUntilMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1173. <p>
  1174. NextUntilMatcher gets all following siblings of each element up to but not
  1175. including the element matched by the matcher. It returns a new Selection
  1176. object containing the matched elements.
  1177. </p>
  1178. <h3 id="Selection.NextUntilNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=16605:16671#L384">NextUntilNodes</a></h3>
  1179. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextUntilNodes(nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1180. <p>
  1181. NextUntilNodes gets all following siblings of each element up to but not
  1182. including the element matched by the nodes. It returns a new Selection
  1183. object containing the matched elements.
  1184. </p>
  1185. <h3 id="Selection.NextUntilSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=16261:16326#L374">NextUntilSelection</a></h3>
  1186. <pre>func (s *<a href="index.html#Selection">Selection</a>) NextUntilSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1187. <p>
  1188. NextUntilSelection gets all following siblings of each element up to but not
  1189. including the element matched by the Selection. It returns a new Selection
  1190. object containing the matched elements.
  1191. </p>
  1192. <h3 id="Selection.Not">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=741:792#L10">Not</a></h3>
  1193. <pre>func (s *<a href="index.html#Selection">Selection</a>) Not(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1194. <p>
  1195. Not removes elements from the Selection that match the selector string.
  1196. It returns a new Selection object with the matching elements removed.
  1197. </p>
  1198. <h3 id="Selection.NotFunction">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=1543:1615#L28">NotFunction</a></h3>
  1199. <pre>func (s *<a href="index.html#Selection">Selection</a>) NotFunction(f func(<a href="../../../builtin/index.html#int">int</a>, *<a href="index.html#Selection">Selection</a>) <a href="../../../builtin/index.html#bool">bool</a>) *<a href="index.html#Selection">Selection</a></pre>
  1200. <p>
  1201. NotFunction removes elements from the Selection that pass the function&#39;s test.
  1202. It returns a new Selection object with the matching elements removed.
  1203. </p>
  1204. <h3 id="Selection.NotMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=998:1050#L16">NotMatcher</a></h3>
  1205. <pre>func (s *<a href="index.html#Selection">Selection</a>) NotMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1206. <p>
  1207. NotMatcher removes elements from the Selection that match the given matcher.
  1208. It returns a new Selection object with the matching elements removed.
  1209. </p>
  1210. <h3 id="Selection.NotNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=2101:2161#L40">NotNodes</a></h3>
  1211. <pre>func (s *<a href="index.html#Selection">Selection</a>) NotNodes(nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1212. <p>
  1213. NotNodes removes elements from the Selection that match the specified nodes.
  1214. It returns a new Selection object with the matching elements removed.
  1215. </p>
  1216. <h3 id="Selection.NotSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/filter.go?s=2773:2832#L56">NotSelection</a></h3>
  1217. <pre>func (s *<a href="index.html#Selection">Selection</a>) NotSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1218. <p>
  1219. NotSelection removes elements from the Selection that match a node in the specified
  1220. Selection object. It returns a new Selection object with the matching elements removed.
  1221. </p>
  1222. <h3 id="Selection.Parent">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=3883:3922#L95">Parent</a></h3>
  1223. <pre>func (s *<a href="index.html#Selection">Selection</a>) Parent() *<a href="index.html#Selection">Selection</a></pre>
  1224. <p>
  1225. Parent gets the parent of each element in the Selection. It returns a
  1226. new Selection object containing the matched elements.
  1227. </p>
  1228. <h3 id="Selection.ParentFiltered">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=4135:4197#L101">ParentFiltered</a></h3>
  1229. <pre>func (s *<a href="index.html#Selection">Selection</a>) ParentFiltered(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1230. <p>
  1231. ParentFiltered gets the parent of each element in the Selection filtered by a
  1232. selector. It returns a new Selection object containing the matched elements.
  1233. </p>
  1234. <h3 id="Selection.ParentMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=4438:4493#L107">ParentMatcher</a></h3>
  1235. <pre>func (s *<a href="index.html#Selection">Selection</a>) ParentMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1236. <p>
  1237. ParentMatcher gets the parent of each element in the Selection filtered by a
  1238. matcher. It returns a new Selection object containing the matched elements.
  1239. </p>
  1240. <h3 id="Selection.Parents">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=6401:6441#L164">Parents</a></h3>
  1241. <pre>func (s *<a href="index.html#Selection">Selection</a>) Parents() *<a href="index.html#Selection">Selection</a></pre>
  1242. <p>
  1243. Parents gets the ancestors of each element in the current Selection. It
  1244. returns a new Selection object with the matched elements.
  1245. </p>
  1246. <h3 id="Selection.ParentsFiltered">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=6648:6711#L170">ParentsFiltered</a></h3>
  1247. <pre>func (s *<a href="index.html#Selection">Selection</a>) ParentsFiltered(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1248. <p>
  1249. ParentsFiltered gets the ancestors of each element in the current
  1250. Selection. It returns a new Selection object with the matched elements.
  1251. </p>
  1252. <h3 id="Selection.ParentsFilteredUntil">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=8635:8724#L214">ParentsFilteredUntil</a></h3>
  1253. <pre>func (s *<a href="index.html#Selection">Selection</a>) ParentsFilteredUntil(filterSelector, untilSelector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1254. <p>
  1255. ParentsFilteredUntil is like ParentsUntil, with the option to filter the
  1256. results based on a selector string. It returns a new Selection
  1257. object containing the matched elements.
  1258. </p>
  1259. <h3 id="Selection.ParentsFilteredUntilMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=9037:9118#L220">ParentsFilteredUntilMatcher</a></h3>
  1260. <pre>func (s *<a href="index.html#Selection">Selection</a>) ParentsFilteredUntilMatcher(filter, until <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1261. <p>
  1262. ParentsFilteredUntilMatcher is like ParentsUntilMatcher, with the option to filter the
  1263. results based on a matcher. It returns a new Selection object containing the matched elements.
  1264. </p>
  1265. <h3 id="Selection.ParentsFilteredUntilNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=10176:10276#L244">ParentsFilteredUntilNodes</a></h3>
  1266. <pre>func (s *<a href="index.html#Selection">Selection</a>) ParentsFilteredUntilNodes(filterSelector <a href="../../../builtin/index.html#string">string</a>, nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1267. <p>
  1268. ParentsFilteredUntilNodes is like ParentsUntilNodes, with the
  1269. option to filter the results based on a selector string. It returns a new
  1270. Selection object containing the matched elements.
  1271. </p>
  1272. <h3 id="Selection.ParentsFilteredUntilSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=9398:9497#L227">ParentsFilteredUntilSelection</a></h3>
  1273. <pre>func (s *<a href="index.html#Selection">Selection</a>) ParentsFilteredUntilSelection(filterSelector <a href="../../../builtin/index.html#string">string</a>, sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1274. <p>
  1275. ParentsFilteredUntilSelection is like ParentsUntilSelection, with the
  1276. option to filter the results based on a selector string. It returns a new
  1277. Selection object containing the matched elements.
  1278. </p>
  1279. <h3 id="Selection.ParentsMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=6947:7003#L176">ParentsMatcher</a></h3>
  1280. <pre>func (s *<a href="index.html#Selection">Selection</a>) ParentsMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1281. <p>
  1282. ParentsMatcher gets the ancestors of each element in the current
  1283. Selection. It returns a new Selection object with the matched elements.
  1284. </p>
  1285. <h3 id="Selection.ParentsMatcherUntilNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=10563:10655#L251">ParentsMatcherUntilNodes</a></h3>
  1286. <pre>func (s *<a href="index.html#Selection">Selection</a>) ParentsMatcherUntilNodes(filter <a href="index.html#Matcher">Matcher</a>, nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1287. <p>
  1288. ParentsMatcherUntilNodes is like ParentsUntilNodes, with the
  1289. option to filter the results based on a matcher. It returns a new
  1290. Selection object containing the matched elements.
  1291. </p>
  1292. <h3 id="Selection.ParentsMatcherUntilSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=9773:9864#L234">ParentsMatcherUntilSelection</a></h3>
  1293. <pre>func (s *<a href="index.html#Selection">Selection</a>) ParentsMatcherUntilSelection(filter <a href="index.html#Matcher">Matcher</a>, sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1294. <p>
  1295. ParentsMatcherUntilSelection is like ParentsUntilSelection, with the
  1296. option to filter the results based on a matcher. It returns a new
  1297. Selection object containing the matched elements.
  1298. </p>
  1299. <h3 id="Selection.ParentsUntil">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=7276:7336#L183">ParentsUntil</a></h3>
  1300. <pre>func (s *<a href="index.html#Selection">Selection</a>) ParentsUntil(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1301. <p>
  1302. ParentsUntil gets the ancestors of each element in the Selection, up to but
  1303. not including the element matched by the selector. It returns a new Selection
  1304. object containing the matched elements.
  1305. </p>
  1306. <h3 id="Selection.ParentsUntilMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=7629:7690#L190">ParentsUntilMatcher</a></h3>
  1307. <pre>func (s *<a href="index.html#Selection">Selection</a>) ParentsUntilMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1308. <p>
  1309. ParentsUntilMatcher gets the ancestors of each element in the Selection, up to but
  1310. not including the element matched by the matcher. It returns a new Selection
  1311. object containing the matched elements.
  1312. </p>
  1313. <h3 id="Selection.ParentsUntilNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=8316:8385#L207">ParentsUntilNodes</a></h3>
  1314. <pre>func (s *<a href="index.html#Selection">Selection</a>) ParentsUntilNodes(nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1315. <p>
  1316. ParentsUntilNodes gets the ancestors of each element in the Selection,
  1317. up to but not including the specified nodes. It returns a
  1318. new Selection object containing the matched elements.
  1319. </p>
  1320. <h3 id="Selection.ParentsUntilSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=7967:8035#L197">ParentsUntilSelection</a></h3>
  1321. <pre>func (s *<a href="index.html#Selection">Selection</a>) ParentsUntilSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1322. <p>
  1323. ParentsUntilSelection gets the ancestors of each element in the Selection,
  1324. up to but not including the elements in the specified Selection. It returns a
  1325. new Selection object containing the matched elements.
  1326. </p>
  1327. <h3 id="Selection.Prepend">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=5600:5655#L156">Prepend</a></h3>
  1328. <pre>func (s *<a href="index.html#Selection">Selection</a>) Prepend(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1329. <p>
  1330. Prepend prepends the elements specified by the selector to each element in
  1331. the set of matched elements, following the same rules as Append.
  1332. </p>
  1333. <h3 id="Selection.PrependHtml">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=6354:6409#L177">PrependHtml</a></h3>
  1334. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrependHtml(html <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1335. <p>
  1336. PrependHtml parses the html and prepends it to the set of matched elements.
  1337. </p>
  1338. <h3 id="Selection.PrependMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=5883:5939#L164">PrependMatcher</a></h3>
  1339. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrependMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1340. <p>
  1341. PrependMatcher prepends the elements specified by the matcher to each
  1342. element in the set of matched elements.
  1343. </p>
  1344. <p>
  1345. This follows the same rules as Selection.Append.
  1346. </p>
  1347. <h3 id="Selection.PrependNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=6606:6667#L185">PrependNodes</a></h3>
  1348. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrependNodes(ns ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1349. <p>
  1350. PrependNodes prepends the specified nodes to each node in the set of
  1351. matched elements.
  1352. </p>
  1353. <p>
  1354. This follows the same rules as Selection.Append.
  1355. </p>
  1356. <h3 id="Selection.PrependSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=6169:6232#L172">PrependSelection</a></h3>
  1357. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrependSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1358. <p>
  1359. PrependSelection prepends the elements in the selection to each element in
  1360. the set of matched elements.
  1361. </p>
  1362. <p>
  1363. This follows the same rules as Selection.Append.
  1364. </p>
  1365. <h3 id="Selection.Prev">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=13649:13686#L317">Prev</a></h3>
  1366. <pre>func (s *<a href="index.html#Selection">Selection</a>) Prev() *<a href="index.html#Selection">Selection</a></pre>
  1367. <p>
  1368. Prev gets the immediately preceding sibling of each element in the
  1369. Selection. It returns a new Selection object containing the matched elements.
  1370. </p>
  1371. <h3 id="Selection.PrevAll">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=14579:14619#L337">PrevAll</a></h3>
  1372. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevAll() *<a href="index.html#Selection">Selection</a></pre>
  1373. <p>
  1374. PrevAll gets all the preceding siblings of each element in the
  1375. Selection. It returns a new Selection object containing the matched elements.
  1376. </p>
  1377. <h3 id="Selection.PrevAllFiltered">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=14879:14942#L344">PrevAllFiltered</a></h3>
  1378. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevAllFiltered(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1379. <p>
  1380. PrevAllFiltered gets all the preceding siblings of each element in the
  1381. Selection filtered by a selector. It returns a new Selection object
  1382. containing the matched elements.
  1383. </p>
  1384. <h3 id="Selection.PrevAllMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=15230:15286#L351">PrevAllMatcher</a></h3>
  1385. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevAllMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1386. <p>
  1387. PrevAllMatcher gets all the preceding siblings of each element in the
  1388. Selection filtered by a matcher. It returns a new Selection object
  1389. containing the matched elements.
  1390. </p>
  1391. <h3 id="Selection.PrevFiltered">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=13947:14007#L324">PrevFiltered</a></h3>
  1392. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevFiltered(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1393. <p>
  1394. PrevFiltered gets the immediately preceding sibling of each element in the
  1395. Selection filtered by a selector. It returns a new Selection object
  1396. containing the matched elements.
  1397. </p>
  1398. <h3 id="Selection.PrevFilteredUntil">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=20621:20707#L475">PrevFilteredUntil</a></h3>
  1399. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevFilteredUntil(filterSelector, untilSelector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1400. <p>
  1401. PrevFilteredUntil is like PrevUntil, with the option to filter
  1402. the results based on a selector string.
  1403. It returns a new Selection object containing the matched elements.
  1404. </p>
  1405. <h3 id="Selection.PrevFilteredUntilMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=21037:21115#L483">PrevFilteredUntilMatcher</a></h3>
  1406. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevFilteredUntilMatcher(filter, until <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1407. <p>
  1408. PrevFilteredUntilMatcher is like PrevUntilMatcher, with the option to filter
  1409. the results based on a matcher.
  1410. It returns a new Selection object containing the matched elements.
  1411. </p>
  1412. <h3 id="Selection.PrevFilteredUntilNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=22160:22257#L508">PrevFilteredUntilNodes</a></h3>
  1413. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevFilteredUntilNodes(filterSelector <a href="../../../builtin/index.html#string">string</a>, nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1414. <p>
  1415. PrevFilteredUntilNodes is like PrevUntilNodes, with the
  1416. option to filter the results based on a selector string. It returns a new
  1417. Selection object containing the matched elements.
  1418. </p>
  1419. <h3 id="Selection.PrevFilteredUntilSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=21409:21505#L491">PrevFilteredUntilSelection</a></h3>
  1420. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevFilteredUntilSelection(filterSelector <a href="../../../builtin/index.html#string">string</a>, sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1421. <p>
  1422. PrevFilteredUntilSelection is like PrevUntilSelection, with the
  1423. option to filter the results based on a selector string. It returns a new
  1424. Selection object containing the matched elements.
  1425. </p>
  1426. <h3 id="Selection.PrevMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=14296:14349#L331">PrevMatcher</a></h3>
  1427. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1428. <p>
  1429. PrevMatcher gets the immediately preceding sibling of each element in the
  1430. Selection filtered by a matcher. It returns a new Selection object
  1431. containing the matched elements.
  1432. </p>
  1433. <h3 id="Selection.PrevMatcherUntilNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=22558:22647#L516">PrevMatcherUntilNodes</a></h3>
  1434. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevMatcherUntilNodes(filter <a href="index.html#Matcher">Matcher</a>, nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1435. <p>
  1436. PrevMatcherUntilNodes is like PrevUntilNodes, with the
  1437. option to filter the results based on a matcher. It returns a new
  1438. Selection object containing the matched elements.
  1439. </p>
  1440. <h3 id="Selection.PrevMatcherUntilSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=21772:21860#L498">PrevMatcherUntilSelection</a></h3>
  1441. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevMatcherUntilSelection(filter <a href="index.html#Matcher">Matcher</a>, sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1442. <p>
  1443. PrevMatcherUntilSelection is like PrevUntilSelection, with the
  1444. option to filter the results based on a matcher. It returns a new
  1445. Selection object containing the matched elements.
  1446. </p>
  1447. <h3 id="Selection.PrevUntil">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=16947:17004#L392">PrevUntil</a></h3>
  1448. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevUntil(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1449. <p>
  1450. PrevUntil gets all preceding siblings of each element up to but not
  1451. including the element matched by the selector. It returns a new Selection
  1452. object containing the matched elements.
  1453. </p>
  1454. <h3 id="Selection.PrevUntilMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=17305:17363#L400">PrevUntilMatcher</a></h3>
  1455. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevUntilMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1456. <p>
  1457. PrevUntilMatcher gets all preceding siblings of each element up to but not
  1458. including the element matched by the matcher. It returns a new Selection
  1459. object containing the matched elements.
  1460. </p>
  1461. <h3 id="Selection.PrevUntilNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=17989:18055#L418">PrevUntilNodes</a></h3>
  1462. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevUntilNodes(nodes ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1463. <p>
  1464. PrevUntilNodes gets all preceding siblings of each element up to but not
  1465. including the element matched by the nodes. It returns a new Selection
  1466. object containing the matched elements.
  1467. </p>
  1468. <h3 id="Selection.PrevUntilSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=17645:17710#L408">PrevUntilSelection</a></h3>
  1469. <pre>func (s *<a href="index.html#Selection">Selection</a>) PrevUntilSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1470. <p>
  1471. PrevUntilSelection gets all preceding siblings of each element up to but not
  1472. including the element matched by the Selection. It returns a new Selection
  1473. object containing the matched elements.
  1474. </p>
  1475. <h3 id="Selection.Remove">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=7016:7055#L195">Remove</a></h3>
  1476. <pre>func (s *<a href="index.html#Selection">Selection</a>) Remove() *<a href="index.html#Selection">Selection</a></pre>
  1477. <p>
  1478. Remove removes the set of matched elements from the document.
  1479. It returns the same selection, now consisting of nodes not in the document.
  1480. </p>
  1481. <h3 id="Selection.RemoveAttr">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/property.go?s=884:942#L28">RemoveAttr</a></h3>
  1482. <pre>func (s *<a href="index.html#Selection">Selection</a>) RemoveAttr(attrName <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1483. <p>
  1484. RemoveAttr removes the named attribute from each element in the set of matched elements.
  1485. </p>
  1486. <h3 id="Selection.RemoveClass">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/property.go?s=3605:3664#L132">RemoveClass</a></h3>
  1487. <pre>func (s *<a href="index.html#Selection">Selection</a>) RemoveClass(class ...<a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1488. <p>
  1489. RemoveClass removes the given class(es) from each element in the set of matched elements.
  1490. Multiple class names can be specified, separated by a space or via multiple arguments.
  1491. If no class name is provided, all classes are removed.
  1492. </p>
  1493. <h3 id="Selection.RemoveFiltered">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=7271:7333#L207">RemoveFiltered</a></h3>
  1494. <pre>func (s *<a href="index.html#Selection">Selection</a>) RemoveFiltered(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1495. <p>
  1496. RemoveFiltered removes the set of matched elements by selector.
  1497. It returns the Selection of removed nodes.
  1498. </p>
  1499. <h3 id="Selection.RemoveMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=7489:7544#L213">RemoveMatcher</a></h3>
  1500. <pre>func (s *<a href="index.html#Selection">Selection</a>) RemoveMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1501. <p>
  1502. RemoveMatcher removes the set of matched elements.
  1503. It returns the Selection of removed nodes.
  1504. </p>
  1505. <h3 id="Selection.ReplaceWith">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=7794:7853#L222">ReplaceWith</a></h3>
  1506. <pre>func (s *<a href="index.html#Selection">Selection</a>) ReplaceWith(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1507. <p>
  1508. ReplaceWith replaces each element in the set of matched elements with the
  1509. nodes matched by the given selector.
  1510. It returns the removed elements.
  1511. </p>
  1512. <p>
  1513. This follows the same rules as Selection.Append.
  1514. </p>
  1515. <h3 id="Selection.ReplaceWithHtml">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=8771:8830#L249">ReplaceWithHtml</a></h3>
  1516. <pre>func (s *<a href="index.html#Selection">Selection</a>) ReplaceWithHtml(html <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1517. <p>
  1518. ReplaceWithHtml replaces each element in the set of matched elements with
  1519. the parsed HTML.
  1520. It returns the removed elements.
  1521. </p>
  1522. <p>
  1523. This follows the same rules as Selection.Append.
  1524. </p>
  1525. <h3 id="Selection.ReplaceWithMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=8128:8188#L231">ReplaceWithMatcher</a></h3>
  1526. <pre>func (s *<a href="index.html#Selection">Selection</a>) ReplaceWithMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1527. <p>
  1528. ReplaceWithMatcher replaces each element in the set of matched elements with
  1529. the nodes matched by the given Matcher.
  1530. It returns the removed elements.
  1531. </p>
  1532. <p>
  1533. This follows the same rules as Selection.Append.
  1534. </p>
  1535. <h3 id="Selection.ReplaceWithNodes">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=9072:9137#L258">ReplaceWithNodes</a></h3>
  1536. <pre>func (s *<a href="index.html#Selection">Selection</a>) ReplaceWithNodes(ns ...*<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1537. <p>
  1538. ReplaceWithNodes replaces each element in the set of matched elements with
  1539. the given nodes.
  1540. It returns the removed elements.
  1541. </p>
  1542. <p>
  1543. This follows the same rules as Selection.Append.
  1544. </p>
  1545. <h3 id="Selection.ReplaceWithSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=8469:8536#L240">ReplaceWithSelection</a></h3>
  1546. <pre>func (s *<a href="index.html#Selection">Selection</a>) ReplaceWithSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1547. <p>
  1548. ReplaceWithSelection replaces each element in the set of matched elements with
  1549. the nodes from the given Selection.
  1550. It returns the removed elements.
  1551. </p>
  1552. <p>
  1553. This follows the same rules as Selection.Append.
  1554. </p>
  1555. <h3 id="Selection.SetAttr">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/property.go?s=1101:1161#L37">SetAttr</a></h3>
  1556. <pre>func (s *<a href="index.html#Selection">Selection</a>) SetAttr(attrName, val <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1557. <p>
  1558. SetAttr sets the given attribute on each element in the set of matched elements.
  1559. </p>
  1560. <h3 id="Selection.Siblings">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=10866:10907#L257">Siblings</a></h3>
  1561. <pre>func (s *<a href="index.html#Selection">Selection</a>) Siblings() *<a href="index.html#Selection">Selection</a></pre>
  1562. <p>
  1563. Siblings gets the siblings of each element in the Selection. It returns
  1564. a new Selection object containing the matched elements.
  1565. </p>
  1566. <h3 id="Selection.SiblingsFiltered">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=11150:11214#L264">SiblingsFiltered</a></h3>
  1567. <pre>func (s *<a href="index.html#Selection">Selection</a>) SiblingsFiltered(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1568. <p>
  1569. SiblingsFiltered gets the siblings of each element in the Selection
  1570. filtered by a selector. It returns a new Selection object containing the
  1571. matched elements.
  1572. </p>
  1573. <h3 id="Selection.SiblingsMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/traversal.go?s=11485:11542#L271">SiblingsMatcher</a></h3>
  1574. <pre>func (s *<a href="index.html#Selection">Selection</a>) SiblingsMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1575. <p>
  1576. SiblingsMatcher gets the siblings of each element in the Selection
  1577. filtered by a matcher. It returns a new Selection object containing the
  1578. matched elements.
  1579. </p>
  1580. <h3 id="Selection.Size">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/property.go?s=1745:1775#L63">Size</a></h3>
  1581. <pre>func (s *<a href="index.html#Selection">Selection</a>) Size() <a href="../../../builtin/index.html#int">int</a></pre>
  1582. <p>
  1583. Size is an alias for Length.
  1584. </p>
  1585. <h3 id="Selection.Slice">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/array.go?s=1073:1125#L29">Slice</a></h3>
  1586. <pre>func (s *<a href="index.html#Selection">Selection</a>) Slice(start, end <a href="../../../builtin/index.html#int">int</a>) *<a href="index.html#Selection">Selection</a></pre>
  1587. <p>
  1588. Slice reduces the set of matched elements to a subset specified by a range
  1589. of indices.
  1590. </p>
  1591. <h3 id="Selection.Text">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/property.go?s=1489:1522#L52">Text</a></h3>
  1592. <pre>func (s *<a href="index.html#Selection">Selection</a>) Text() <a href="../../../builtin/index.html#string">string</a></pre>
  1593. <p>
  1594. Text gets the combined text contents of each element in the set of matched
  1595. elements, including their descendants.
  1596. </p>
  1597. <h3 id="Selection.ToggleClass">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/property.go?s=4303:4362#L160">ToggleClass</a></h3>
  1598. <pre>func (s *<a href="index.html#Selection">Selection</a>) ToggleClass(class ...<a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1599. <p>
  1600. ToggleClass adds or removes the given class(es) for each element in the set of matched elements.
  1601. Multiple class names can be specified, separated by a space or via multiple arguments.
  1602. </p>
  1603. <h3 id="Selection.Union">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/expand.go?s=1082:1134#L21">Union</a></h3>
  1604. <pre>func (s *<a href="index.html#Selection">Selection</a>) Union(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1605. <p>
  1606. Union is an alias for AddSelection.
  1607. </p>
  1608. <h3 id="Selection.Unwrap">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=9360:9399#L266">Unwrap</a></h3>
  1609. <pre>func (s *<a href="index.html#Selection">Selection</a>) Unwrap() *<a href="index.html#Selection">Selection</a></pre>
  1610. <p>
  1611. Unwrap removes the parents of the set of matched elements, leaving the matched
  1612. elements (and their siblings, if any) in their place.
  1613. It returns the original selection.
  1614. </p>
  1615. <h3 id="Selection.Wrap">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=9996:10048#L284">Wrap</a></h3>
  1616. <pre>func (s *<a href="index.html#Selection">Selection</a>) Wrap(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1617. <p>
  1618. Wrap wraps each element in the set of matched elements inside the first
  1619. element matched by the given selector. The matched child is cloned before
  1620. being inserted into the document.
  1621. </p>
  1622. <p>
  1623. It returns the original set of elements.
  1624. </p>
  1625. <h3 id="Selection.WrapAll">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=11748:11803#L336">WrapAll</a></h3>
  1626. <pre>func (s *<a href="index.html#Selection">Selection</a>) WrapAll(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1627. <p>
  1628. WrapAll wraps a single HTML structure, matched by the given selector, around
  1629. all elements in the set of matched elements. The matched child is cloned
  1630. before being inserted into the document.
  1631. </p>
  1632. <p>
  1633. It returns the original set of elements.
  1634. </p>
  1635. <h3 id="Selection.WrapAllHtml">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=12824:12879#L363">WrapAllHtml</a></h3>
  1636. <pre>func (s *<a href="index.html#Selection">Selection</a>) WrapAllHtml(html <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1637. <p>
  1638. WrapAllHtml wraps the given HTML structure around all elements in the set of
  1639. matched elements. The matched child is cloned before being inserted into the
  1640. document.
  1641. </p>
  1642. <p>
  1643. It returns the original set of elements.
  1644. </p>
  1645. <h3 id="Selection.WrapAllMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=12113:12169#L345">WrapAllMatcher</a></h3>
  1646. <pre>func (s *<a href="index.html#Selection">Selection</a>) WrapAllMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1647. <p>
  1648. WrapAllMatcher wraps a single HTML structure, matched by the given Matcher,
  1649. around all elements in the set of matched elements. The matched child is
  1650. cloned before being inserted into the document.
  1651. </p>
  1652. <p>
  1653. It returns the original set of elements.
  1654. </p>
  1655. <h3 id="Selection.WrapAllNode">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=13316:13372#L379">WrapAllNode</a></h3>
  1656. <pre>func (s *<a href="index.html#Selection">Selection</a>) WrapAllNode(n *<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1657. <p>
  1658. WrapAllNode wraps the given node around the first element in the Selection,
  1659. making all other nodes in the Selection children of the given node. The node
  1660. is cloned before being inserted into the document.
  1661. </p>
  1662. <p>
  1663. It returns the original set of elements.
  1664. </p>
  1665. <h3 id="Selection.WrapAllSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=12498:12561#L354">WrapAllSelection</a></h3>
  1666. <pre>func (s *<a href="index.html#Selection">Selection</a>) WrapAllSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1667. <p>
  1668. WrapAllSelection wraps a single HTML structure, the first node of the given
  1669. Selection, around all elements in the set of matched elements. The matched
  1670. child is cloned before being inserted into the document.
  1671. </p>
  1672. <p>
  1673. It returns the original set of elements.
  1674. </p>
  1675. <h3 id="Selection.WrapHtml">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=10951:11003#L310">WrapHtml</a></h3>
  1676. <pre>func (s *<a href="index.html#Selection">Selection</a>) WrapHtml(html <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1677. <p>
  1678. WrapHtml wraps each element in the set of matched elements inside the inner-
  1679. most child of the given HTML.
  1680. </p>
  1681. <p>
  1682. It returns the original set of elements.
  1683. </p>
  1684. <h3 id="Selection.WrapInner">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=13969:14026#L406">WrapInner</a></h3>
  1685. <pre>func (s *<a href="index.html#Selection">Selection</a>) WrapInner(selector <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1686. <p>
  1687. WrapInner wraps an HTML structure, matched by the given selector, around the
  1688. content of element in the set of matched elements. The matched child is
  1689. cloned before being inserted into the document.
  1690. </p>
  1691. <p>
  1692. It returns the original set of elements.
  1693. </p>
  1694. <h3 id="Selection.WrapInnerHtml">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=15099:15156#L433">WrapInnerHtml</a></h3>
  1695. <pre>func (s *<a href="index.html#Selection">Selection</a>) WrapInnerHtml(html <a href="../../../builtin/index.html#string">string</a>) *<a href="index.html#Selection">Selection</a></pre>
  1696. <p>
  1697. WrapInnerHtml wraps an HTML structure, matched by the given selector, around
  1698. the content of element in the set of matched elements. The matched child is
  1699. cloned before being inserted into the document.
  1700. </p>
  1701. <p>
  1702. It returns the original set of elements.
  1703. </p>
  1704. <h3 id="Selection.WrapInnerMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=14345:14403#L415">WrapInnerMatcher</a></h3>
  1705. <pre>func (s *<a href="index.html#Selection">Selection</a>) WrapInnerMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1706. <p>
  1707. WrapInnerMatcher wraps an HTML structure, matched by the given selector,
  1708. around the content of element in the set of matched elements. The matched
  1709. child is cloned before being inserted into the document.
  1710. </p>
  1711. <p>
  1712. It returns the original set of elements.
  1713. </p>
  1714. <h3 id="Selection.WrapInnerNode">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=15464:15522#L442">WrapInnerNode</a></h3>
  1715. <pre>func (s *<a href="index.html#Selection">Selection</a>) WrapInnerNode(n *<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1716. <p>
  1717. WrapInnerNode wraps an HTML structure, matched by the given selector, around
  1718. the content of element in the set of matched elements. The matched child is
  1719. cloned before being inserted into the document.
  1720. </p>
  1721. <p>
  1722. It returns the original set of elements.
  1723. </p>
  1724. <h3 id="Selection.WrapInnerSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=14732:14797#L424">WrapInnerSelection</a></h3>
  1725. <pre>func (s *<a href="index.html#Selection">Selection</a>) WrapInnerSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1726. <p>
  1727. WrapInnerSelection wraps an HTML structure, matched by the given selector,
  1728. around the content of element in the set of matched elements. The matched
  1729. child is cloned before being inserted into the document.
  1730. </p>
  1731. <p>
  1732. It returns the original set of elements.
  1733. </p>
  1734. <h3 id="Selection.WrapMatcher">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=10344:10397#L293">WrapMatcher</a></h3>
  1735. <pre>func (s *<a href="index.html#Selection">Selection</a>) WrapMatcher(m <a href="index.html#Matcher">Matcher</a>) *<a href="index.html#Selection">Selection</a></pre>
  1736. <p>
  1737. WrapMatcher wraps each element in the set of matched elements inside the
  1738. first element matched by the given matcher. The matched child is cloned
  1739. before being inserted into the document.
  1740. </p>
  1741. <p>
  1742. It returns the original set of elements.
  1743. </p>
  1744. <h3 id="Selection.WrapNode">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=11278:11331#L319">WrapNode</a></h3>
  1745. <pre>func (s *<a href="index.html#Selection">Selection</a>) WrapNode(n *<a href="../../../golang.org/x/net/html/index.html">html</a>.<a href="../../../golang.org/x/net/html/index.html#Node">Node</a>) *<a href="index.html#Selection">Selection</a></pre>
  1746. <p>
  1747. WrapNode wraps each element in the set of matched elements inside the inner-
  1748. most child of the given node. The given node is copied before being inserted
  1749. into the document.
  1750. </p>
  1751. <p>
  1752. It returns the original set of elements.
  1753. </p>
  1754. <h3 id="Selection.WrapSelection">func (*Selection) <a href="http://localhost:6060/src/github.com/PuerkitoBio/goquery/manipulation.go?s=10691:10751#L302">WrapSelection</a></h3>
  1755. <pre>func (s *<a href="index.html#Selection">Selection</a>) WrapSelection(sel *<a href="index.html#Selection">Selection</a>) *<a href="index.html#Selection">Selection</a></pre>
  1756. <p>
  1757. WrapSelection wraps each element in the set of matched elements inside the
  1758. first element in the given Selection. The element is cloned before being
  1759. inserted into the document.
  1760. </p>
  1761. <p>
  1762. It returns the original set of elements.
  1763. </p>
  1764. <div id="footer">
  1765. Build version go1.6.<br>
  1766. Except as <a href="https://developers.google.com/site-policies#restrictions">noted</a>,
  1767. the content of this page is licensed under the
  1768. Creative Commons Attribution 3.0 License,
  1769. and code is licensed under a <a href="http://localhost:6060/LICENSE">BSD license</a>.<br>
  1770. <a href="http://localhost:6060/doc/tos.html">Terms of Service</a> |
  1771. <a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
  1772. </div>
  1773. </div><!-- .container -->
  1774. </div><!-- #page -->
  1775. <!-- TODO(adonovan): load these from <head> using "defer" attribute? -->
  1776. <script type="text/javascript" src="../../../../lib/godoc/jquery.js"></script>
  1777. <script type="text/javascript" src="../../../../lib/godoc/jquery.treeview.js"></script>
  1778. <script type="text/javascript" src="../../../../lib/godoc/jquery.treeview.edit.js"></script>
  1779. <script type="text/javascript" src="../../../../lib/godoc/godocs.js"></script>
  1780. </body>
  1781. </html>