From 3f51e73944453c00db7b0175f3df1330cd7b66fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Mon, 30 Jul 2007 09:09:24 +0000 Subject: [PATCH] * src/xml.erl: Remove compilation warnings (EJAB-290). SVN Revision: 838 --- ChangeLog | 2 ++ src/xml.erl | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0bb42bff2..4629a3ce8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2007-07-30 Mickael Remond + * src/xml.erl: Remove compilation warnings (EJAB-290). + * src/xml.erl: Do not crypt binary CData, but enclose the value in XML CDATA "tag". diff --git a/src/xml.erl b/src/xml.erl index 1c6a407f5..60c5d7934 100644 --- a/src/xml.erl +++ b/src/xml.erl @@ -58,7 +58,7 @@ crypt(S) when is_list(S) -> crypt(S) when is_binary(S) -> crypt(binary_to_list(S)). -remove_cdata_p({xmlelement, Name, Attrs, Els}) -> true; +remove_cdata_p({xmlelement, _Name, _Attrs, _Els}) -> true; remove_cdata_p(_) -> false. remove_cdata(L) -> [E || E <- L, remove_cdata_p(E)]. @@ -73,7 +73,7 @@ get_cdata([_ | L], S) -> get_cdata([], S) -> S. -get_tag_cdata({xmlelement, Name, Attrs, Els}) -> +get_tag_cdata({xmlelement, _Name, _Attrs, Els}) -> get_cdata(Els). get_attr(AttrName, Attrs) -> @@ -92,10 +92,10 @@ get_attr_s(AttrName, Attrs) -> "" end. -get_tag_attr(AttrName, {xmlelement, Name, Attrs, Els}) -> +get_tag_attr(AttrName, {xmlelement, _Name, Attrs, _Els}) -> get_attr(AttrName, Attrs). -get_tag_attr_s(AttrName, {xmlelement, Name, Attrs, Els}) -> +get_tag_attr_s(AttrName, {xmlelement, _Name, Attrs, _Els}) -> get_attr_s(AttrName, Attrs).