<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hey<div><br></div><div>Yes I am integrating with with an MNO and it would seem it breaks their XML decoder.</div><div>I would be curious to know what they use, as its also written in Erlang.</div><div><br></div><div>Looks like there isn’t a way to tweak the xmerl:export_simple/2 function.</div><div>I have to obfuscate the gt character before the export, and post process the XML string.. regex to the rescue… :|</div><div><br><div>
<div>-- </div><div>Anthony</div>
</div>
<br><div><div>On 23 Jan 2015, at 15:08, Vlad Dumitrescu <<a href="mailto:vladdu55@gmail.com">vladdu55@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi!<div><br></div><div>I guess that it's not escaped because it's not required to be. Only & and < must be, according to the spec (<a href="http://www.w3.org/TR/xml11/#syntax">http://www.w3.org/TR/xml11/#syntax</a>). > must be escaped in text when part of the string "]]>".</div><div><br></div><div>Do you have a parser that chokes on that?</div><div><br></div><div>regards,</div><div>Vlad</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 23, 2015 at 12:19 PM, Anthony Jackson <span dir="ltr"><<a href="mailto:anthony.jackson@patternmatched.com" target="_blank">anthony.jackson@patternmatched.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
It would seem that XMERL doesn’t escape greater than characters in Attribute strings.<br>
Is this a bug, or is this intentional?<br>
<br>
Function to look at is ./xmerl-1.3.6/src/xmerl_lib.erl -> export_attribute/2<br>
<br>
12> f(Packet), Packet = [{ussd,[ {'STRING',"this has > escape"}],["this has > escape", {cookie,[],[]}]}].<br>
[{ussd,[{'STRING',"this has > escape"}],<br>
["this has > escape",{cookie,[],[]}]}]<br>
13> lists:flatten(xmerl:export_simple(Packet, xmerl_xml)).<br>
"<?xml version=\"1.0\"?><ussd STRING=\"this has > escape\">this has > escape<cookie/></ussd>”<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Anthony<br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</font></span></blockquote></div><br></div>
</blockquote></div><br></div></body></html>