Get element name
Arguments
- x
A document (from
read_html()
), node set (fromhtml_elements()
), node (fromhtml_element()
), or session (fromsession()
).
Examples
url <- "https://rvest.tidyverse.org/articles/starwars.html"
html <- read_html(url)
html %>%
html_element("div") %>%
html_children() %>%
html_name()
#> [1] "a" "small" "button" "div"