Introduce comparing with namespace support.
This commit is contained in:
parent
04ec34bed8
commit
1b1661fd82
16 changed files with 156 additions and 20 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue