Category Archives: XMLDocument

Converting objects to XML packets using the SimpleXMLEncoder class in Flex

In a previous example, “Converting XML to objects using the Flex SimpleXMLDecoder class”, we saw how to convert an XML instance into an Object instance using the SimpleXMLDecoder class and decodeXML() method.

The following example shows how you can convert an array of objects into an XML object using the SimpleXMLEncoder class and encodeValue() method in Flex.

Full code after the jump.

Continue reading Converting objects to XML packets using the SimpleXMLEncoder class in Flex

Converting XML to objects using the Flex SimpleXMLDecoder class

Similar to the previous post, “Converting XML to objects using the Flex HTTPService MXML tag“, the following example shows how you can use the decodeXML() method in the SimpleXMLDecoder class to convert an XMLDocument object into an ActionScript Object object.

Full code after the jump.

Continue reading Converting XML to objects using the Flex SimpleXMLDecoder class