patch-xml 0.0.3

Load and patch xml files. Pre-alpha version. No stable interface until version 0.1.0.
1
2
3
4
5
6
7
8
9
10
11
pub fn test_patch(xml_str: &str, patch_str: &str, expected_result: &str) {
    let result_str = patch_xml::patch_xml(xml_str.to_string(), patch_str.to_string());
    assert_eq!(
        result_str.unwrap(),
        format!(
            r#"<?xml version="1.0" encoding="UTF-8"?>{}"#,
            expected_result
        )
        .to_string()
    );
}