Skip to main content
paulp613
Participant
October 3, 2015
Question

Why can't I load sent/received data into an xml array?

  • October 3, 2015
  • 1 reply
  • 606 views

I have been using kglad's send/receive code:

var sendLV:LoadVars=new LoadVars();

var receiveLV:LoadVars=new LoadVars();

receiveLV.onData=function(src:String){

trace(src);

//etc. . . .

The code apparently functions well because the "trace (src);" line generates what looks like perfectly formatted xml text in the output window:

<?xml version="1.0"?>

<news>

  <item>

  <dates>2015-08-29</dates>

  <title>The Martian</title>

  <prenom>Andy</prenom>

  <author>Weir</author>

  <genre>Fic</genre>

  <verdict>Good</verdict>

  <comments>Mark Watney never wanted to be a Martian potato farmer. He just kinda fell into it.</comments>

  <cover>the-martian.jpg</cover>

  <bio>https://en.wikipedia.org/wiki/Andy_Weir_(writer)</bio>

  </item>

</news>

But after trying for 2 days and 50 different approaches I have been unable to get the "received" data to load up on a page.

Any ideas or advice?

Thanks.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
October 5, 2015

what do you mean by '..unable to get the "received" data to load..'?  the trace output shows the data loads.  what's failing?