diff options
author | Alexey Shchepin <alexey@process-one.net> | 2003-05-18 16:41:15 +0000 |
---|---|---|
committer | Alexey Shchepin <alexey@process-one.net> | 2003-05-18 16:41:15 +0000 |
commit | d719a93fa1258f68ee97ccb6c72c98171e5a800a (patch) | |
tree | 49de042ef90434d98d7afb7c8922ee029f4de18a /src/xml.erl | |
parent | * src/ejabberd_s2s.erl: Added error catching for do_route/3 (diff) |
* src/mod_muc/mod_muc.erl: Now body of message from admin to MUC
service is broadcasted to all conferences
* src/mod_muc/mod_muc_room.erl: Likewise
SVN Revision: 110
Diffstat (limited to 'src/xml.erl')
-rw-r--r-- | src/xml.erl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/xml.erl b/src/xml.erl index 76da8a709..88b00e7b1 100644 --- a/src/xml.erl +++ b/src/xml.erl @@ -40,6 +40,31 @@ attrs_to_string(Attrs) -> attr_to_string({Name, Value}) -> " " ++ crypt(Name) ++ "='" ++ crypt(Value) ++ "'". + +%element_to_string2(El) -> +% lists:flatten(element_to_string21(El)). +% +%element_to_string21(El) -> +% case El of +% {xmlelement, Name, Attrs, Els} -> +% if length(Els) > 0 -> +% [[$< | Name], attrs_to_list(Attrs), ">", +% lists:map(fun(E) -> element_to_string21(E) end, Els), +% "</", Name, ">"]; +% true -> +% ["<", Name, attrs_to_list(Attrs), "/>"] +% end; +% {xmlcdata, CData} -> crypt(CData) +% end. +% +%attrs_to_list(Attrs) -> +% lists:map(fun(A) -> attr_to_list(A) end, Attrs). +% +%attr_to_list({Name, Value}) -> +% [" ", crypt(Name), "='", crypt(Value), "'"]. + + + %crypt(S) -> % lists:reverse(crypt(S, "")). % |