You can read an xml from the simulator

david20 Oct 2011 3:46 AM
I'm trying to read an xml file that is in a web and gives me error when I run the methodsend () does not change the state and will not let me continue.

It is very urgent

thank you very much

buddy20 Oct 2011 11:53 AM
Can &nbsp;we see your code and the error? &nbsp;That could help point us in the right direction<br><br><div class="quote "><div class="quotetop ">QUOTE<cite>(david @ 20 Oct 2011 3:46 AM)</cite><blockquote class="quotemain"><div><span style="color:#333333;font-family:arial, sans-serif;font-size:16px;line-height:normal;background-color:#f5f5f5;"><span class="hps">I&#39;m</span>&nbsp;<span class="hps">trying to read</span>&nbsp;<span class="hps">an</span>&nbsp;<span class="hps">xml file that</span>&nbsp;<span class="hps">is in a</span>&nbsp;<span class="hps">web</span>&nbsp;<span class="hps">and gives me</span>&nbsp;<span class="hps">error when I run</span>&nbsp;<span class="hps">the method</span><span class="hps">send ()</span>&nbsp;<span class="hps">does not change the</span>&nbsp;<span class="hps">state and</span>&nbsp;<span class="hps">will not let me</span>&nbsp;<span class="hps">continue.</span><br><br><span class="hps">It is very urgent</span><br><br><span class="hps">thank you very much</span></span><br></div></blockquote></div></div>
david21 Oct 2011 1:55 AM
<span id="result_box" lang="en"><span class="hps">I do not really</span> <span class="hps">fails</span> <span class="hps">the problem is that</span> <span class="hps">when I do a</span> <span class="hps">send ()</span> <span class="hps">does not change</span> <span class="hps">the state</span> <span class="hps">and I</span> <span class="hps">download the</span> <span class="hps">xml</span></span><br><br><div class="quote"><div class="quotetop">QUOTE<cite>(buddy @ 20 Oct 2011 11:53 AM)</cite></div><blockquote class="quotemain">Can &nbsp;we see your code and the error? &nbsp;That could help point us in the right direction<br><br><div class="quote "><div class="quotetop ">QUOTE<cite>(david @ 20 Oct 2011 3:46 AM)</cite><blockquote class="quotemain"><div><span style="LINE-HEIGHT:normal;BACKGROUND-COLOR:#f5f5f5;FONT-FAMILY:arial, sans-serif;COLOR:#333333;FONT-SIZE:16px;"><span class="hps">I&#39;m</span>&nbsp;<span class="hps">trying to read</span>&nbsp;<span class="hps">an</span>&nbsp;<span class="hps">xml file that</span>&nbsp;<span class="hps">is in a</span>&nbsp;<span class="hps">web</span>&nbsp;<span class="hps">and gives me</span>&nbsp;<span class="hps">error when I run</span>&nbsp;<span class="hps">the method</span><span class="hps">send ()</span>&nbsp;<span class="hps">does not change the</span>&nbsp;<span class="hps">state and</span>&nbsp;<span class="hps">will not let me</span>&nbsp;<span class="hps">continue.</span><br><br><span class="hps">It is very urgent</span><br><br><span class="hps">thank you very much</span></span><br></div></blockquote></div></div></blockquote></div>
Vivek Jani21 Oct 2011 5:25 AM
Are you trying to download an XML file from a URL? Have you tried this?<br><br><br><span style="font-family:Courier New;">var request = new URL();</span><br><span style="font-family:Courier New;">request.callback = callback;</span><br><span style="font-family:Courier New;">request.location = url;</span><br><br><span style="font-family:Courier New;">request.fetchAsync(function (u) {</span><br><span style="font-family:Courier New;">if (u.response == 200){</span><br>&nbsp;&nbsp;&nbsp; <span style="font-family:Courier New;">u.callback(u.result);</span><br><span style="font-family:Courier New;">} else {</span><br>&nbsp;&nbsp;&nbsp; <br><span style="font-family:Courier New;">}</span><br><span style="font-family:Courier New;">});</span><br>