minidom: breaking: Allow getting Element attributes by namespace
- Move Element.attributes to `AttrMap`, slowly using rxml's features and unrolling our own. - Add Element::attr_ns that requires the attribute namespace. Element:attr defaults to rxml::Namespace::none() but the interface changes nonetheless for a &NcNameStr. Similar changes on `ElementBuilder` methods. - Remove iterator structs for attributes, return a ref on the AttrMap directly as we don't need to keep attributes' internals hidden anymore. - Enable rxml's `macros` feature within tests to access the `xml_ncname` macro. Signed-off-by: pep <pep@bouah.net>
This commit is contained in:
parent
48f67d034e
commit
19865e5f1e
14 changed files with 272 additions and 236 deletions
|
|
@ -193,7 +193,7 @@ mod tests {
|
|||
let query = ServicesQuery { type_: None };
|
||||
let elem = Element::from(query);
|
||||
assert!(elem.is("services", ns::EXT_DISCO));
|
||||
assert_eq!(elem.attrs().next(), None);
|
||||
assert_eq!(elem.attrs().into_iter().next(), None);
|
||||
assert_eq!(elem.nodes().next(), None);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue