5 Replies Latest reply on Dec 27, 2006 12:41 PM by FlightGuy

    Converting between XML and XMLNode

      Does anyone know how to convert an XML object to an XMLNode object? It would seem there must be something out there to do this, but I can't see it.

      I've written classes to encode and decode actionscript objects into the java XStream xml format. I want to use these functions as the XMLEncode and XMLDecode properties of an HTTPService, so that I can send and receive objects directly and have these functions deal with the encoding and decoding.

      Unfortunately the HTTPService throws and exception if the encode function returns an XML object and appears to require an XMLNode. I'm not enthusiastic to modify all my encoding logic to use the old XMLNode/XMLDocument classes.

      Though I haven't got there yet, I expecting to have the same problem the other way 'round, when decoding I'll be handed an XMLNode and have to convert it to and XML object as well.