all_children: Extract all children nodes

View source: R/children_node.R

all_childrenR Documentation

Extract all children nodes

Description

Extract all children nodes

Usage

all_children(x, res = "do not change", i = 1)

Arguments

x

one or more documents, nodes, or node sets.

res

omit. do not make any change.

i

must be 1

Value

nodeset

Examples

txt='<div class="activityBody postBody thing">
        <p>
            <a href="/forum/conversation" class="mqPostRef">(22)</a>
            where?
        </p>
      <p>
        stays 
        <b>disappears</b>
        <a>disappears</a>
        <span>disappears</span>
        stays
      </p>
    </div>'
    library(xml2)
    html=read_html(txt)
    
    all_children(html)

do documentation built on Sept. 12, 2024, 6:27 a.m.