Lines Matching refs:attributes
26 fn get_attribute(attributes: &[OwnedAttribute], tag: &str, key: &str) -> Result<String> { in get_attribute()
27 attributes in get_attribute()
66 for (name, attributes) in events.into_iter().filter_map(|e| match e { in verify_xml()
67 XmlEvent::StartElement { name, attributes, namespace: _ } => { in verify_xml()
68 Some((name.local_name, attributes)) in verify_xml()
76 id: get_attribute(&attributes, "sdk", "id")?, in verify_xml()
77 shortname: get_attribute(&attributes, "sdk", "shortname")?, in verify_xml()
78 name: get_attribute(&attributes, "sdk", "name")?, in verify_xml()
79 reference: get_attribute(&attributes, "sdk", "reference")?, in verify_xml()
85 jar: get_attribute(&attributes, "symbol", "jar")?, in verify_xml()
86 pattern: get_attribute(&attributes, "symbol", "pattern")?, in verify_xml()
87 sdks: get_attribute(&attributes, "symbol", "sdks")? in verify_xml()
168 let Ok(XmlEvent::StartElement { attributes, .. }) = iter.next().unwrap() else { in test_get_attribute()
171 assert_eq!(get_attribute(&attributes, "tag", "a").unwrap(), "A"); in test_get_attribute()
172 assert!(get_attribute(&attributes, "tag", "no-such-attribute").is_err()); in test_get_attribute()