has_children {do} | R Documentation |
Wether children nodes exist
Description
Wether children nodes exist
Usage
has_children(...)
Arguments
... |
one or more documents, nodes, or node sets. |
Value
logical value
Examples
txt='<div class="activityBody postBody thing">
<p>
<a href="/forum/conversation" rel="post" >(22)</a>
where?
</p>
<p>
stays
<b>disappears</b>
<a>disappears</a>D
<span>disappears</span>
stays
</p>
</div>'
library(xml2)
html=read_html(txt)
has_children(html)
[Package do version 2.0.0.0 Index]