From the category archives:

XML

The following example shows how you can use an XML document as a data provider for a Spark List control in Flex 4 by using an XMLListCollection.

Full code after the jump.

[click to continue…]

{ 11 comments }

The following example shows how you can delete nodes from an XML object using the delete operator.

Full code after the jump.

[click to continue…]

{ 4 comments }

The following example shows how you can display dynamically loaded XML data (with namespaces) in a Flex DataGrid control.

Full code after the jump.

[click to continue…]

{ 9 comments }

The following example shows how you can use the describeType() method to inspect a class’s accessor methods.

Full code after the jump.

[click to continue…]

{ 2 comments }

The following example shows how you can parse an XML node with a dash in its node name (<font-family />) as well as parsing an Object with a dash in it’s identifier using the square bracket notation ([]).

Full code after the jump.

[click to continue…]

{ 0 comments }

The following example shows how you can set the amount of indentation used when calling the toXMLString() method by setting the static XML.prettyIndent property in ActionScript.

Full code after the jump.

[click to continue…]

{ 0 comments }

The following example shows how you can ignore comment tags (<!-- … -->) in an XML document by setting the static XML.ignoreComments property.

Full code after the jump.

[click to continue…]

{ 1 comment }

The following example shows how you can get the XML class’s current settings by calling the static XML.settings() method.

Full code after the jump.

[click to continue…]

{ 0 comments }

Converting objects to XML packets using the SimpleXMLEncoder class in Flex

by Peter deHaan March 4, 2008

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 [...]

Read the full article →

Displaying images from an XML file using the Repeater component

by Peter deHaan October 3, 2007

The following example shows you how to use the Repeater component to display images loaded from an external XML file.
Full code after the jump.

Read the full article →

Converting XML to objects using the Flex SimpleXMLDecoder class

by Peter deHaan September 19, 2007

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.

Read the full article →

Converting XML to objects using the Flex HTTPService MXML tag

by Peter deHaan September 19, 2007

The following example shows how you can convert an XML file loaded at run-time using the HTTPService tag, into an ActionScript Object by simply setting the resultFormat property to “object”.
Full code after the jump.

Read the full article →