summaryrefslogtreecommitdiff
path: root/src/xml.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml.erl')
-rw-r--r--src/xml.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xml.erl b/src/xml.erl
index 96d0b218..9a9a7f83 100644
--- a/src/xml.erl
+++ b/src/xml.erl
@@ -28,6 +28,7 @@
-author('alexey@process-one.net').
-export([element_to_string/1,
+ element_to_binary/1,
crypt/1, make_text_node/1,
remove_cdata/1,
get_cdata/1, get_tag_cdata/1,
@@ -47,6 +48,9 @@
-define(ESCAPE_BINARY(CData), crypt(CData)).
-endif.
+element_to_binary(El) ->
+ iolist_to_binary(element_to_string(El)).
+
element_to_string(El) ->
case catch element_to_string_nocatch(El) of
{'EXIT', Reason} ->