Introduce comparing with namespace support.

This commit is contained in:
Astro 2017-08-19 00:04:18 +01:00
commit 1b1661fd82
16 changed files with 156 additions and 20 deletions

View file

@ -208,7 +208,8 @@ impl TryFrom<Element> for ReasonElement {
let mut reason = None;
let mut text = None;
for child in elem.children() {
if child.ns() != Some(ns::JINGLE) {
let child_ns = child.ns();
if child_ns.as_ref().map(|ns| ns.as_str()) != Some(ns::JINGLE) {
return Err(Error::ParseError("Reason contains a foreign element."));
}
match child.name() {