ex5_17

command
v0.0.0-...-94c99f4 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Write a variadic function `ElementsByTagName` that, given an HTML node tree and zero or more names, returns all the elements that match one of those names. Here are two example calls:

`func ElementsByTagName(doc *html.Node, name ...string) []*html.Node`
`images := ElementsByTagName(doc, "img")``
`headings := ElementsByTagName(doc, "h1", "h2", "h3", "h4")``

Jump to

Keyboard shortcuts

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