fn xml_path(stack: &[(String, u64)]) -> String {
    let mut out = String::new();
    for (s, i) in stack {
        out += s;
        // if i == 0, this means we are working with xml attributes
        if *i > 0 {
            out.extend(format!("{}", i).chars());
        }
    }
    out
}
/// builds the XML path for a given stack, by appending key names with their indices
builds the XML path for a given stack, by appending key names with their indices
builds the XML path for a given stack by appending key names with their indices
fn xml_path(stack: &[(String, u64)]) -> String {
    let mut out = String::new();
    for (s, i) in stack {
        out += s;
        // if i == 0, this means we are working with xml attributes
        if *i > 0 {
            out.extend(format!("{}", i).chars());
        }
    }
    out
}
fn xml_path ( stack : & [ ( String , u64 ) ] ) -> String { let mut out = String :: new ( ) ; for ( s , i ) in stack { out += s ; // if i == 0, this means we are working with xml attributes if * i > 0 { out . extend ( format ! ( " " i ) . chars ( ) ) ; } } out }
builds the XML path for a given stack, by appending key names with their indices
builds the XML path for a given stack by appending key names with their indices
stack
&[(String, u64)]