You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ?
<!DOCTYPEarticle PUBLIC "my doctype of doom" "mydoctype.dtd">
<xpath>
<to>
<my>
<infosattrib="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");
The text was updated successfully, but these errors were encountered:
Hello
I have a simple XML loaded and parsed when I try to get an element via
get_child
it does not find it viaget_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:
Is there any way to not do something like this :
The text was updated successfully, but these errors were encountered: