html

package
v0.0.0-...-8cd4330 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: MIT Imports: 1 Imported by: 0

README

Exercise 5.17 (P143)

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")

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ElementsByTagName

func ElementsByTagName(doc *html.Node, name ...string) []*html.Node

ElementsByTagName that given an HTML node tree and zero or moe names, returns all the elements that match one of those names

Types

This section is empty.

Jump to

Keyboard shortcuts

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