Hello,
T = {xmlelement,"presence",
[{"xml:lang","en"}],
[{xmlcdata,<<"\n">>},
{xmlelement,"priority",[],
[{xmlcdata,<<"5">>}]},
{xmlcdata,<<"\n">>},
{xmlelement,"c",
[{"xmlns",
"http://jabber.org/protocol/caps"},
{"node","http://psi-im.org/caps"},
{"ver","0.12.1"},
{"ext","cs ep-notify html"}],
[]},
{xmlcdata,<<"\n">>}]}.
I want to remove all the whitespace i..e tabs/spaces/newline chars. I tried the following, but it does not work:
trim_whitespace(Input) ->
re:replace(Input, "(\r\n)*", "").