xso-proc: add support for string literals for namespaces
Makes it easier to use ad-hoc.
This commit is contained in:
parent
4d1166b66d
commit
2efef5ceeb
3 changed files with 46 additions and 13 deletions
|
|
@ -169,3 +169,17 @@ fn name_path_roundtrip() {
|
|||
};
|
||||
roundtrip_full::<NamePath>("<bar xmlns='urn:example:ns1'/>");
|
||||
}
|
||||
|
||||
#[derive(FromXml, IntoXml, PartialEq, Debug, Clone)]
|
||||
#[xml(namespace = "urn:example:ns2", name = "baz")]
|
||||
struct NamespaceLit;
|
||||
|
||||
#[test]
|
||||
fn namespace_lit_roundtrip() {
|
||||
#[allow(unused_imports)]
|
||||
use std::{
|
||||
option::Option::{None, Some},
|
||||
result::Result::{Err, Ok},
|
||||
};
|
||||
roundtrip_full::<NamespaceLit>("<baz xmlns='urn:example:ns2'/>");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue