txt='
(22)
where?
stays
disappears
disappearsD
disappears
stays
'
library(xml2)
html=read_html(txt)
has_children(html)
Run the code above in your browser using DataLab