# NOT RUN {
# select all paragraph 'p' with "red" class
sel_tag("p") %with% sel_class("red")
# the other way around works equally well
sel_class("red") %with% sel_tag("p")
# select multiple elements
# where id = "x" or class = "center"
sel_id("x") %or% sel_class("center")
# select element with id = "x" and parent's id = "y"
sel_id("y") %child% sel_id("y")
# }
Run the code above in your browser using DataLab