Skip navigation
thomas_th21
Currently Being Moderated

Convert XML to string

Aug 16, 2012 6:58 AM

Hello,

 

I have the following situation:

 

I make an application that stores data in a valid XML file.

The storage of the data with a File.IO operation works well but when I trie to send the file over the internet using a string, it gives me an objectname.

So I have this code for sending the data over the internet :

 

  data = myCertGen.writeXML(myData) --Get my data from a XML obejct

 

  --the data that I want to save.

  tData = ["name":"pcdata.ts","datos":data]

  --call PHP script.

  gNetID = postNetText("http://dev-site.com/telesiminar/save.php",tData)

 

So I get my data from the class who makes the XML. This is a XML object.

Then I send the file over the internet to a php file.

Now in my data I only get <FlashObject d59cd70>

So I know this is a object. Now is my question how do I convert this object back to a string wich I can send ?

 
Replies
  • Currently Being Moderated
    Aug 16, 2012 1:29 PM   in reply to thomas_th21

    I guess the 'data' you refer to is the "datos" of your property list. Perhaps you can use the toString() method.

      data = myCertGen.writeXML(myData)
      data = myCertGen.toString(data)
      put data
    

    This might work, but it isn't clear from what you posted what sort of an object myCertGen points to.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points