Skip to main content

text_content

Function text_content 

Source
pub fn text_content(sel: &Selection<'_>) -> String
Expand description

Get text content of element (recursive).

ยงExample

use html_cleaning::dom;

let doc = dom::parse("<div>Hello <span>World</span></div>");
assert_eq!(dom::text_content(&doc.select("div")), "Hello World");