aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl/src
diff options
context:
space:
mode:
authorLars Thorsen <[email protected]>2017-05-24 07:30:27 +0200
committerLars Thorsen <[email protected]>2017-05-24 12:53:22 +0200
commitf8ab425800ba3b01251616eb73d5faf22bc63387 (patch)
tree022ae2788164c3059345806326d06678bcb062d0 /lib/xmerl/src
parentf3851c6348596b0a9dda2997dac92d9ca9d7c2c1 (diff)
downloadotp-f8ab425800ba3b01251616eb73d5faf22bc63387.tar.gz
otp-f8ab425800ba3b01251616eb73d5faf22bc63387.tar.bz2
otp-f8ab425800ba3b01251616eb73d5faf22bc63387.zip
[xmerl] Fix endDocument bug in output backends
* Fix problem of unexpected endDocument in the old_dom and simple output backends
Diffstat (limited to 'lib/xmerl/src')
-rw-r--r--lib/xmerl/src/xmerl_sax_old_dom.erl7
-rw-r--r--lib/xmerl/src/xmerl_sax_simple_dom.erl5
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/xmerl/src/xmerl_sax_old_dom.erl b/lib/xmerl/src/xmerl_sax_old_dom.erl
index fefcf03fce..411121370f 100644
--- a/lib/xmerl/src/xmerl_sax_old_dom.erl
+++ b/lib/xmerl/src/xmerl_sax_old_dom.erl
@@ -127,9 +127,10 @@ build_dom(endDocument,
State#xmerl_sax_old_dom_state{dom=[Decl, Current#xmlElement{
content=lists:reverse(C)
}]};
- _ ->
- %%?dbg("~p\n", [D]),
- ?error("we're not at end the document when endDocument event is encountered.")
+ _ ->
+ %% endDocument is also sent by the parser when a fault occur to tell
+ %% the event receiver that no more input will be sent
+ State
end;
%% Element
diff --git a/lib/xmerl/src/xmerl_sax_simple_dom.erl b/lib/xmerl/src/xmerl_sax_simple_dom.erl
index 7eb3afd499..d842bd982b 100644
--- a/lib/xmerl/src/xmerl_sax_simple_dom.erl
+++ b/lib/xmerl/src/xmerl_sax_simple_dom.erl
@@ -129,8 +129,9 @@ build_dom(endDocument,
State#xmerl_sax_simple_dom_state{dom=[Decl, {Tag, Attributes,
lists:reverse(Content)}]};
_ ->
- ?dbg("~p\n", [D]),
- ?error("we're not at end the document when endDocument event is encountered.")
+ %% endDocument is also sent by the parser when a fault occur to tell
+ %% the event receiver that no more input will be sent
+ State
end;
%% Element