Thanks Chaps

Real issue is I had read form file (air), and not converted to object
first dum Š.

For anyone else, this seems to work


public static function getObjectToXML(obj:Object):XML
        {
        var qName:QName = new QName("root");
        var xmlDocument:XMLDocument = new XMLDocument();
        var simpleXMLEncoder:SimpleXMLEncoder = new 
SimpleXMLEncoder(xmlDocument);
        var xmlNode:XMLNode = simpleXMLEncoder.encodeValue(obj, qName,
xmlDocument);
        var xml:XML = new XML(xmlDocument.toString());
        return XML(xml.children());
        }



Seems to do the job



On 9/2/13 12:44 PM, "Jeffry Houser" <[email protected]> wrote:

>
>  Any programming language should be able to convert JSON to XML [and
>vice versa].  There are a few libraries for ColdFusion/CFML out there;
>but I've never researched other languages.  I always prefer to use the
>data in its native format if possible.  The Flash Player has some great
>JSON classes.  Are you sure you need to convert it to XML?
>
>On 9/2/2013 7:14 AM, Scott Matheson wrote:
>> Hi
>>      We have an app based round XML, we had been giving some data in
>>JSON. I was looking for a good tool to convert, I can see no good
>>solution on the web
>>
>> Scott
>>
>>
>> ________________________________
>>
>> Disclaimer: This electronic mail and any attachments are confidential
>>and may be privileged. If you are not the intended recipient, please
>>notify the sender immediately by replying to this email, and destroy all
>>copies of this email and any attachments. Thank you.
>>
>
>
>--
>Jeffry Houser
>Technical Entrepreneur
>http://www.jeffryhouser.com
>203-379-0773
>


________________________________

Disclaimer: This electronic mail and any attachments are confidential and may 
be privileged. If you are not the intended recipient, please notify the sender 
immediately by replying to this email, and destroy all copies of this email and 
any attachments. Thank you.

Reply via email to