message: Fix wrong element for xml:lang.
This commit is contained in:
parent
f69f567448
commit
833ef068c6
1 changed files with 2 additions and 2 deletions
|
@ -168,7 +168,7 @@ impl TryFrom<Element> for Message {
|
|||
for _ in elem.children() {
|
||||
return Err(Error::ParseError("Unknown child in body element."));
|
||||
}
|
||||
let lang = get_attr!(root, "xml:lang", default);
|
||||
let lang = get_attr!(elem, "xml:lang", default);
|
||||
let body = Body(elem.text());
|
||||
if bodies.insert(lang, body).is_some() {
|
||||
return Err(Error::ParseError("Body element present twice for the same xml:lang."));
|
||||
|
@ -177,7 +177,7 @@ impl TryFrom<Element> for Message {
|
|||
for _ in elem.children() {
|
||||
return Err(Error::ParseError("Unknown child in subject element."));
|
||||
}
|
||||
let lang = get_attr!(root, "xml:lang", default);
|
||||
let lang = get_attr!(elem, "xml:lang", default);
|
||||
let subject = Subject(elem.text());
|
||||
if subjects.insert(lang, subject).is_some() {
|
||||
return Err(Error::ParseError("Subject element present twice for the same xml:lang."));
|
||||
|
|
Loading…
Reference in a new issue