Using with htmlText to display XML

This is a little something thing that I found this morning in Flex. Not sure it would be of much use but I think it’s kinda cool:

<mx:Text htmlText="{elibXML.music}"/>

Then you can see all the text nodes (the mx:Text component traverses through all the nested nodes) in the targeted XML object.

elibXML is an XML object:

<mx:XML id="elibXML" source="data/eLibrary.xml" format="e4x"/>

and the eLibraray.xml looks something like this:

<music type="album" thumb="img/e336076c29f9162186b8ce463aa93a8c.jpg">
<title>Que Du Bonheur</title>
<artist>Asa</artist>
<year>2008-05-05</year>
<songs>
<name>Que Du Bonheur</name>
</songs>
</music>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: