mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
7 lines
206 B
Rust
7 lines
206 B
Rust
use roxmltree::Document;
|
|
|
|
pub(crate) fn get_child_text(doc: &Document, name: &str) -> Option<String> {
|
|
let node = doc.descendants().find(|n| n.has_tag_name(name))?;
|
|
node.text().map(|s| s.to_string())
|
|
}
|