By converting a @hadley comment into a CW response, you can get the vector of all classes using a wildcard *.
So the approach would look like this:
page <- read_html(doc_url)
page %>%
html_nodes("*") %>%
html_attr("class") %>%
unique()
# [1] NA "component" "waitBlock"
# [4] "waitBlockContainer" "toggle_img" "btn_impression"
# [7] "document_language" "outputEcli" "C19Centre"
# [10] "C71Indicateur" "C02AlineaAltA" "C72Alineadroite"
# [13] "C75Debutdesmotifs" "C01PointnumeroteAltN" "C04Titre1"
# [16] "C03Tiretlong" "C05Titre2" "C06Titre3"
# [19] "C07Titre4" "C48DispositifIntroduction" "C08Dispositif"
# [22] "C77Signatures" "C49FootnoteLangue"
source
share