-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Hello
I have a simple XML loaded and parsed when I try to get an element via get_child it does not find it via get_child("infos") and return NONE, but the documentation say we can do it, or am I wrong ?
https://docs.rs/xmltree/latest/xmltree/struct.Element.html#method.get_child
My XML:
<!DOCTYPE article PUBLIC "my doctype of doom" "mydoctype.dtd">
<xpath>
<to>
<my>
<infos attrib="example">trezaq</infos>
<infosdust>23</infosdust>
</my>
</to>
</xpath>
Is there any way to not do something like this :
let infosdust = root_element.get_child("to").unwrap().get_child("my").unwrap().get_child("infos").unwrap().get_text().unwrap();
assert_eq!(infosdust, "trezaq");Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels