<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Thanks, Mister! &#187; XML</title>
	<atom:link href="http://www.thanksmister.com/index.php/archive/tag/xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thanksmister.com</link>
	<description>Adobe Flex &#38; AIR Development</description>
	<lastBuildDate>Mon, 19 Jul 2010 17:28:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>HTTP Status 201 causing Flex #2032 Error in IE only</title>
		<link>http://www.thanksmister.com/index.php/archive/http-status-201-causing-flex-2032-error-in-ie-only/</link>
		<comments>http://www.thanksmister.com/index.php/archive/http-status-201-causing-flex-2032-error-in-ie-only/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 16:40:13 +0000</pubDate>
		<dc:creator>Mister</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[2032 Error]]></category>
		<category><![CDATA[HTTPService]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Status 201]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://thanksmister.com/?p=508</guid>
		<description><![CDATA[I ran into a problem right when we were going to launch a new Flex web-based application to production (of course) with Internet Explorer and Flex. I was calling an RESTful service that returns XML and using the built-in Flex HTTPService with either POST/GET as the method for the request. Most of the service calls [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into a problem right when we were going to launch a new Flex web-based application to production (of course) with Internet Explorer and Flex.  I was calling an <a href="http://en.wikipedia.org/wiki/REST">RESTful</a> service that returns XML and using the built-in Flex HTTPService  with either POST/GET as the method for the request.   Most of the service calls either return a HTTP Status Code of 200 (OK) or they throw an error.  For one  POST request that returned a HTTP Status of  &#8220;201 Created&#8221;  Flex threw up a <a href="http://livedocs.adobe.com/flex/201/langref/runtimeErrors.html">2032 Stream Error</a> in response.   Here is a brief definition of the error: </p>
<blockquote><p>
<a href="http://editthis.info/flexerrorcodes/Main_Page">The referenced resource does not exist or the swf is trying to access a file across a restricted domain. </a>
</p></blockquote>
<p>This error causes Flex to report a fault error on the request even though it was successful.   The 201 status code  is handled fine in all other browsers except IE (6 &#038; 7).    I did some research on the issue thinking it must be something easy to fix, that many others have run across before me.    It seems the error is out there for lots of different reasons.  </p>
<p>One post reported that IE was having a caching issues, and the way to solve it was to add a random number on the end of your service calls or you have to set the response headers in your server side page to prevent caching.  This one sounds similar to a <a href="http://thanksmister.com/?p=59">FireFox issue</a> I ran into a couple years back, but didn&#8217;t effect the results:</p>
<p><span id="more-508"></span></p>
<p><a href="http://www.judahfrangipane.com/blog/?p=87">http://www.judahfrangipane.com/blog/?p=87</a></p>
<p>The overwhelming number of posts on the subject suggested that Rails and Adobe both share the responsibility for this error (depending on if you are a Rails dev or a Flex dev, the debate rages as to who is to blame).   The fix seems to be changing status returned from Rails to something other than 201.  This seems to be the legit solution since the web service I was hitting is running Rails:</p>
<p><a href="http://stackoverflow.com/questions/354936/flex-2032-stream-error-in-ie-only">http://stackoverflow.com/questions/354936/flex-2032-stream-error-in-ie-only</a><br />
<a href="http://nachbar.name/blog/2008/06/14/flex-railsprotect_from_forgery-problem-with-rails-21-produces-ioerror-2032/">http://nachbar.name/blog/2008/06/14/flex-railsprotect_from_forgery-problem-with-rails-21-produces-ioerror-2032/</a><br />
<a href="http://onrails.org/articles/2008/02/20/dealing-with-http-errors-in-a-flex-with-rails-application">http://onrails.org/articles/2008/02/20/dealing-with-http-errors-in-a-flex-with-rails-application</a><br />
<a href="http://www.manning-sandbox.com/message.jspa?messageID=64372">http://www.manning-sandbox.com/message.jspa?messageID=64372</a><br />
<a href="http://nachbar.name/blog/tag/adobe-flex-programming/">http://nachbar.name/blog/tag/adobe-flex-programming/</a></p>
<p>If you think Adobe should fix the issue (as some Rails people protest) then you can view all the other bug reports Adobe already had lined up to fix that involve a 2032 Stream Error, just type in Explorer 2032 and you will find them:</p>
<p><a href="http://bugs.adobe.com/jira/secure/QuickSearch.jspa">http://bugs.adobe.com/jira/secure/QuickSearch.jspa</a></p>
<p>The workaround we ended up implemented was totally client based.  In the fault handler of this particular service request, I look for the errorID value of the Fault event and ignore it.   It was all I could do on short notice and I wasn&#8217;t about to convince the backend dudes that we needed to change the server response from 201 to 200, pick your battles and my first battle was to get this app into the war. </p>
<p>For me the real culprit is IE (easy target).  Something that works in every other browser but IE is so friggen familiar to anyone who has done any cross-browser work.  IE sucks, it has always sucked, and it will always suck, period.  My other thought is about web services and codes in general.   As an application developer, I use a lot of different services, consuming data from many different pipes.   I couldn&#8217;t tell you as a consumer of web services and an application designer what the value of having a returned  Status of 201 has over returning a Status of 200, can you?    I make a request, and if the request is good, just tell me ok, I don&#8217;t need to know that the server returned a HTTP Status Code of 311 (the server code for &#8220;I just made you a sandwich&#8221;).  I need to know only two basic things, was the request good, or did it explode?</p>
<p>I think some API dudes and backend dudes are purists, they want server codes to bubble up to the client so we can admire them, even though in practice (meaning you actually build applications with these services) you don&#8217;t really need the extra data.  Hey, I am totally used to having to make 5 service calls to accomplish one thing with a web service, I would never ask for the service to be changed to convenience the client, but some information is superfluous and could be scaled down. </p>
<p><strong>UPDATE</strong></p>
<p>Saw another blog post about the same topic at <a href="http://userflex.wordpress.com/2009/01/08/io-stream-errors-in-air/">UserFlex</a>.    </p>
<p>- Mister</p>
<p><map name='google_ad_map_508_1452acacd61817fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/508?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_508_1452acacd61817fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=508&amp;url= http%3A%2F%2Fwww.thanksmister.com%2Findex.php%2Farchive%2Fhttp-status-201-causing-flex-2032-error-in-ie-only%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.thanksmister.com/index.php/archive/http-status-201-causing-flex-2032-error-in-ie-only/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bluestring Flex application launches at Techcrunch40</title>
		<link>http://www.thanksmister.com/index.php/archive/bluestringcom-launches/</link>
		<comments>http://www.thanksmister.com/index.php/archive/bluestringcom-launches/#comments</comments>
		<pubDate>Tue, 18 Sep 2007 23:03:01 +0000</pubDate>
		<dc:creator>Mister</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex News]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Illustrator]]></category>
		<category><![CDATA[TechCrunch40]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://thanksmister.com/?p=72</guid>
		<description><![CDATA[I just arrived at Techcrunch40 as AOL prepares to launch a brand new Flex application our team has been working on for the past few months (though it seems like years). Our group is releasing an application called Bluestring that allow users&#160;upload, share, and&#160;make&#160;&#8221;creations&#8221;.&#160;&#160;Bluestring also offers&#8217;s users the ability to pull assets from&#160;other online services [...]]]></description>
			<content:encoded><![CDATA[<p>I just arrived at Techcrunch40 as AOL prepares to launch a brand new <a href="http://www.adobe.com/products/flex/" target="_blank">Flex</a> application our team has been working on for the past few months (though it seems like years). Our group is releasing an application called <a href="http://www.bluestring.com">Bluestring</a> that allow users&nbsp;upload, share, and&nbsp;make&nbsp;&#8221;creations&#8221;.&nbsp;&nbsp;Bluestring also offers&#8217;s users the ability to pull assets from&nbsp;other online services into their creations without actually moving&nbsp;the files into their Bluestring account.&nbsp;&nbsp; We&nbsp;reference the files from aggregated sources and save that to the RSS&nbsp;that is feeding our&nbsp;embedded Flash player.&nbsp;&nbsp;&nbsp;</p>
<p><a href="http://www.flickr.com/photos/thanksmr/1403687167/" title="Just arrived at Techcrunch40 by thanksmr, on Flickr"><img src="http://farm2.static.flickr.com/1257/1403687167_cf3e17ca24.jpg" width="500" height="400" alt="Just arrived at Techcrunch40" /></a> </p>
<p>Yep, that is me <img src='http://www.thanksmister.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Bluestring represents the second enterprise level Flex application launched by our team in the last year. The reason I mention Enterprise is because there are a lot of really cool Flex applications out there, but Bluestring is built, and tested to withstand time and traffic of millions of users.&nbsp; You don&#8217;t need an AOL account to sign up for Bluestring, probably for the first time you can use whatever email account you already have to register.&nbsp; Though Bluestring is a beta, its still offers robust file management and sharing capabilities.&nbsp; This is because we built Bluestring is built entirely upon the <a href="http://dev.aol.com/xdrive_api">Xdrive Open API</a>&nbsp;which offers a lot of different ways to share.&nbsp; This also means that any media file you upload to your Xdrive account will show up in Bluestring, and vice versa.&nbsp;&nbsp; </p>
<p>&nbsp;<a href="http://www.flickr.com/photos/thanksmr/1398606598/" title="AOL booth at Techcrunch40 by thanksmr, on Flickr"><img src="http://farm2.static.flickr.com/1169/1398606598_01e2fd6187.jpg" width="500" height="400" alt="AOL booth at Techcrunch40" /></a> </p>
<p>The AOL Techcrunch40 Booth.&nbsp; </p>
<p>Your Bluestring files and creations can be shared privately, publicly, or even as a collaborate show with rostered list of users.&nbsp;&nbsp;Users can contribute to a &#8220;String It&#8221; creation from their own accounts and then pass that creation to a friend to add his/her own media.&nbsp;&nbsp; People editing the show can rearrange and even delete other peoples content, but it never wipes it from that persons account.&nbsp; Items within shows are referenced back to either the aggregated sources or to other Bluestring accounts. </p>
<p><a href="http://www.flickr.com/photos/thanksmr/1403703923/" title="Bluestring.com launches by thanksmr, on Flickr"><img src="http://farm2.static.flickr.com/1217/1403703923_60019bb500.jpg" width="500" height="400" alt="Bluestring.com launches" /></a>
<p>Our team presenting Bluestring to the Techcrunch audience.</p>
<p>I am very proud of this product, it was certainly a lot of Flex coding by both myself and Larry (the other Flex dude working for AOL in Beverly Hills with me).&nbsp; Something nice about Bluestring is that the graphics used were almost entirely vector graphics in a single Flash 9 library.&nbsp;&nbsp; This gives&nbsp;Bluestring the appearance of not appearing like every other Flex application on the market (with the exception of Picnik, which&nbsp;I adore). &nbsp; The graphics were mostly imported as PNG files saved from Photoshop while others were imported from Illustrator (simple copy/paste).&nbsp; All the images were then converted to Flash vector graphics and given instance names within the library.&nbsp; The CSS file and a shared assets class file referenced the instance names within the SWF.&nbsp; </p>
<p>We also used about 15 different Flex&nbsp;modules using the new&nbsp;Flex&nbsp;&lt;mx:Module&gt; tag introduced in Flex&nbsp;2.01.&nbsp;&nbsp;Each module&nbsp;gets loaded as the user navigates through the major views. Modules really slimmed down the size of the application and decreased the initial load time.&nbsp;&nbsp;However,&nbsp;it was a bit challenging at first devising a method of using modules with Cairngorm, but I think we have a really proven method that I might talk about in future posts.&nbsp;&nbsp; Most of the text within Bluestring resides in a single external xml file that can eventually be localized into different languages.&nbsp; The XML file is loaded at runtime before any of the graphics libraries or modules are loaded, making sure the text is ready before we load any views that bind to the text in the model. </p>
<p>I will be working to post some more code samples and components that we use for Bluestring in upcoming posts as time permits.&nbsp; We also have some new items coming down the pipe for AIR.&nbsp;&nbsp; For those of you interested, please check our the presentation&nbsp;<a href="http://www.fitc.ca/speaker_detail.cfm?festival_id=21&amp;speaker_id=10574" target="_blank">Larry</a> and <a href="http://www.fitc.ca/speaker_detail.cfm?festival_id=21" target="_blank">I</a> will be giving&nbsp;at the upcoming <a href="http://www.fitc.ca/event_detail.cfm?festival_id=21" target="_blank">FITC Hollywood</a>&nbsp;called <a href="http://www.fitc.ca/presentation_detail.cfm?festival_id=21&amp;presentation_id=541" target="_blank">Concepts on AIR</a>.</p>
<p>For those of you at the last 360Flex conference, you now know what the Bluestring <a href="http://www.360conferences.com/360flex/2007/09/360flex-had-bluestring-before.html">lanyards</a> around your necks means. Due to some legal reasons and duct tape, we were unable to talk about Bluestring when we were at 360Flex. Maybe next year when 360Flex comes to Los Angeles???? we can talk about other products we are working on <img src='http://www.thanksmister.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>-Mister</p>
<p><map name='google_ad_map_72_1452acacd61817fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/72?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_72_1452acacd61817fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=72&amp;url= http%3A%2F%2Fwww.thanksmister.com%2Findex.php%2Farchive%2Fbluestringcom-launches%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.thanksmister.com/index.php/archive/bluestringcom-launches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using XML with DataGrid itemRenderers</title>
		<link>http://www.thanksmister.com/index.php/archive/using-multiple-itemrenderers-with-flex-2-datagrid/</link>
		<comments>http://www.thanksmister.com/index.php/archive/using-multiple-itemrenderers-with-flex-2-datagrid/#comments</comments>
		<pubDate>Wed, 23 Aug 2006 14:55:24 +0000</pubDate>
		<dc:creator>Mister</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[ItemRenderer]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://thanksmister.com/?p=24</guid>
		<description><![CDATA[For a recent project I needed a way to create a ComboBox in a DataGrid component that was populated by an XML file.&#160;&#160; I found an older example by Brendan Meutzner that used an ArrayCollection. This was a good starting point, so I modified and added to the file to create an example that uses [...]]]></description>
			<content:encoded><![CDATA[<p>For a recent project I needed a way to create a ComboBox in a DataGrid component that was populated by an XML file.&nbsp;&nbsp; I found an older example by <a href="http://www.visualconcepts.ca/blog/index.cfm/2006/6/22/ComoboBox-RendererEditor-for-20" target="_blank">Brendan Meutzner</a> that used an ArrayCollection. This was a good starting point, so I modified and added to the file to create an example that uses a ComboBox, CheckBox, and NumericStepper within the DataGrid and populated by an external XML file.&nbsp; The real trick is getting the XML file to be updated when changes to the itemRenderer occurred. This is where Brendan&#8217;s example helped the most.&nbsp; Using the editorDataField and renderIsEditor properties of the DataGridColumn, the changes to the itemRenderer were able to update the dataField and the XML file itself.&nbsp;&nbsp; Another trick I found interesting was making the the value or selected values of the NumericStepper and CheckBox components Bindable within the itemRenderer code.&nbsp;&nbsp; You can review the complete file and source code below. </p>
<p><a href="http://thanksmister.com/dgrenderer/index.html" rel="nofollow">Sample and Source Code</a></p>
<p><map name='google_ad_map_24_1452acacd61817fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/24?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_24_1452acacd61817fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=24&amp;url= http%3A%2F%2Fwww.thanksmister.com%2Findex.php%2Farchive%2Fusing-multiple-itemrenderers-with-flex-2-datagrid%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.thanksmister.com/index.php/archive/using-multiple-itemrenderers-with-flex-2-datagrid/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Binding XML to ComboBox using XMLListCollection</title>
		<link>http://www.thanksmister.com/index.php/archive/binding-xml-to-combobox/</link>
		<comments>http://www.thanksmister.com/index.php/archive/binding-xml-to-combobox/#comments</comments>
		<pubDate>Fri, 18 Aug 2006 20:34:23 +0000</pubDate>
		<dc:creator>Mister</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Binding]]></category>
		<category><![CDATA[ComboBox]]></category>
		<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XMLList]]></category>
		<category><![CDATA[XMLListCollection]]></category>

		<guid isPermaLink="false">http://thanksmister.com/?p=22</guid>
		<description><![CDATA[This post has been in serious need of updating since its one of my more popular posts, but the post is really outdated. Here is a new way to bind your data to a ComboBox and DataGrid by loading your XML document and converting it to an XMLListCollection. Update 9/15/2009 An easier way to convert [...]]]></description>
			<content:encoded><![CDATA[<p>This post has been in serious need of updating since its one of my more popular posts, but the post is really outdated.   Here is a new way to bind your data to a ComboBox and DataGrid by loading your XML document and converting it to an XMLListCollection.   </p>
<p><strong>Update 9/15/2009</strong></p>
<p>An easier way to convert XML to a bindable list is to convert it to an XMLListCollection.   I used Adobe AIR for the application output because security changes in Flex 3/Flash 9 prevent you from easily reading local XML files within a browser-based Flex project.   Below is the complete XML and MXML files:</p>
<p><strong>XML</strong></p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&lt;</span>competencylist<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&lt;</span>competency identifier=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&lt;</span>data<span style="color: #66cc66;">&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&lt;/</span>data<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&lt;</span>label<span style="color: #66cc66;">&gt;</span>Comeptency <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&lt;/</span>label<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&lt;/</span>competency<span style="color: #66cc66;">&gt;</span><br />
<span style="color: #66cc66;">&lt;/</span>competencylist<span style="color: #66cc66;">&gt;</span></div></td></tr></tbody></table></div>
<p><strong>MXML</strong></p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:640px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&lt;</span>?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #66cc66;">&gt;</span><br />
<span style="color: #66cc66;">&lt;</span>mx:WindowedApplication xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> horizontalAlign=<span style="color: #ff0000;">&quot;left&quot;</span> creationComplete=<span style="color: #ff0000;">&quot;init()&quot;</span><span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:Script<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;!</span><span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">collections</span>.<span style="color: #006600;">XMLListCollection</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">rpc</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">FaultEvent</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">controls</span>.<span style="color: #006600;">Alert</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">collections</span>.<span style="color: #006600;">ArrayCollection</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">rpc</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">ResultEvent</span>;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span> <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> competencyListData:XMLListCollection;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span> <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> xmlURL:<span style="color: #0066CC;">String</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/***********************<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Some code comes from the following examples:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Marco Casario<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; http://casario.blogs.com/mmworld/2006/07/arraycollection.html<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Brendan Meutzner<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; http://www.visualconcepts.ca/blog/index.cfm/2006/6/22/Loading-modifying-writing-XML-locally-with-Flex-20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *****************/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">url</span>:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;data/test.xml&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> d:<span style="color: #0066CC;">Date</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Date</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xmlURL = <span style="color: #0066CC;">url</span> &nbsp;+ <span style="color: #ff0000;">&quot;?&quot;</span> + d.<span style="color: #0066CC;">getTime</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// great idea Brendan!</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlDataList.<span style="color: #0066CC;">send</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> resultHandler<span style="color: #66cc66;">&#40;</span>event:ResultEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// seems to only work with casting, not ArrayCollection(result)</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//competencyListData = new ArrayCollection(xmlDataList.lastResult.competencylist.competency );</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> xmlList:XMLList = xmlDataList.<span style="color: #006600;">lastResult</span>.<span style="color: #006600;">competencylist</span>.<span style="color: #006600;">competency</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; competencyListData = <span style="color: #000000; font-weight: bold;">new</span> XMLListCollection<span style="color: #66cc66;">&#40;</span> xmlDataList.<span style="color: #006600;">lastResult</span>.<span style="color: #006600;">children</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>competencyListData.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> faultHandler<span style="color: #66cc66;">&#40;</span>event:FaultEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Fault : &quot;</span> + event.<span style="color: #0066CC;">message</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> setOutputData<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outPut.<span style="color: #0066CC;">text</span> = event.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">selectedItem</span>.<span style="color: #0066CC;">data</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;/</span>mx:Script<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:HTTPService id=<span style="color: #ff0000;">&quot;xmlDataList&quot;</span> <span style="color: #0066CC;">url</span>=<span style="color: #ff0000;">&quot;{xmlURL}&quot;</span> fault=<span style="color: #ff0000;">&quot;faultHandler(event)&quot;</span> result=<span style="color: #ff0000;">&quot;resultHandler(event)&quot;</span> method=<span style="color: #ff0000;">&quot;GET&quot;</span> resultFormat=<span style="color: #ff0000;">&quot;e4x&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:ComboBox id=<span style="color: #ff0000;">&quot;NameSelect&quot;</span> dataProvider=<span style="color: #ff0000;">&quot;{competencyListData}&quot;</span> labelField=<span style="color: #ff0000;">&quot;label&quot;</span> change=<span style="color: #ff0000;">&quot;setOutputData(event);&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:DataGrid dataProvider=<span style="color: #ff0000;">&quot;{competencyListData}&quot;</span> change=<span style="color: #ff0000;">&quot;setOutputData(event);&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;102&quot;</span><span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:columns<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:DataGridColumn headerText=<span style="color: #ff0000;">&quot;ID&quot;</span> dataField=<span style="color: #ff0000;">&quot;data&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:DataGridColumn headerText=<span style="color: #ff0000;">&quot;Label&quot;</span> dataField=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;/</span>mx:columns<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;/</span>mx:DataGrid<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:HBox <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;202&quot;</span><span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:Label <span style="color: #0066CC;">text</span>=<span style="color: #ff0000;">&quot;Data Selected:&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>mx:TextInput <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;100&quot;</span> id=<span style="color: #ff0000;">&quot;outPut&quot;</span><span style="color: #66cc66;">/&gt;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;/</span>mx:HBox<span style="color: #66cc66;">&gt;</span><br />
<span style="color: #66cc66;">&lt;/</span>mx:WindowedApplication<span style="color: #66cc66;">&gt;</span></div></td></tr></tbody></table></div>
<p>To use this example, just create a new AIR project in your Flex Builder 3 and create a new xml document named data.xml within the src/data/ folder structure.  Copy the MXML code to your Main.mxml file for the application and run.   If you want to do this example in a web-based Flex project then you will have to overcome the issues with loading a local XML file into Flex within the browser.  See the post comments for that discussion.</p>
<p>- Mister</p>
<p><strong>OLD POST (outdated)</strong></p>
<p>I have been banging my head the past couple days trying to get an XML file I created to bind to and show up in a ComboBox.&nbsp; I found a couple of examples on different blogs, but they didn&#8217;t seem to work or were not updated to work with the Flex 2 (instead of beta 3).&nbsp;&nbsp;&nbsp;&nbsp; My XML file consisted of the following structure:</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&lt;</span>competencylist<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&lt;</span>competency identifier=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&lt;</span>data<span style="color: #66cc66;">&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&lt;/</span>data<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&lt;</span>label<span style="color: #66cc66;">&gt;</span>Comeptency <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&lt;/</span>label<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&lt;/</span>competency<span style="color: #66cc66;">&gt;</span><br />
<span style="color: #66cc66;">&lt;/</span>competencylist<span style="color: #66cc66;">&gt;</span></div></td></tr></tbody></table></div>
<p>I thought I could just use HTTPS, load my XML, and bind the structure to an ArrayCollection.&nbsp; I tried the following:</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">myAC = <span style="color: #000000; font-weight: bold;">new</span> ArrayCollection<span style="color: #66cc66;">&#40;</span>myXML.<span style="color: #006600;">lastResult</span>.<span style="color: #006600;">competencylist</span>.<span style="color: #006600;">competency</span><span style="color: #66cc66;">&#41;</span></div></td></tr></tbody></table></div>
<p>But the nothing would show up in the ComboBox.&nbsp; I ended up casting the returned XML as an ArrayCollection, this proved more positive:</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;myAC = myXML.<span style="color: #006600;">lastResult</span>.<span style="color: #006600;">competencylist</span>.<span style="color: #006600;">competency</span> as ArrayCollection;</div></td></tr></tbody></table></div>
<p>I did find some discussion about the issue on Flash Coders.&nbsp; I also referenced some blog examples by <a href="http://casario.blogs.com/mmworld/2006/07/arraycollection.html" target="_blank" rel="tag">Marco Casario</a> and <a href="http://www.visualconcepts.ca/blog/index.cfm/2006/6/22/Loading-modifying-writing-XML-locally-with-Flex-20" target="_blank" rel="tag">Brendan Meutzner</a>. </p>
<p><a href="http://thanksmister.com/xmlcombo/index.html" rel="nofollow">Sample and Source code</a></p>
<p><map name='google_ad_map_22_1452acacd61817fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/22?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_22_1452acacd61817fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=22&amp;url= http%3A%2F%2Fwww.thanksmister.com%2Findex.php%2Farchive%2Fbinding-xml-to-combobox%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.thanksmister.com/index.php/archive/binding-xml-to-combobox/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Bringing special characters into Flex with XML</title>
		<link>http://www.thanksmister.com/index.php/archive/bringing-special-characters-into-flex-with-xml/</link>
		<comments>http://www.thanksmister.com/index.php/archive/bringing-special-characters-into-flex-with-xml/#comments</comments>
		<pubDate>Thu, 10 Aug 2006 01:21:21 +0000</pubDate>
		<dc:creator>Mister</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Unicode]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://thanksmister.com/?p=15</guid>
		<description><![CDATA[In a recent project, I wanted to load the Unicode values for special characters from an external XML file to add a special characters panel to the RichTextEditor. I wanted these values to show up in a label or text box using something like label.htmlText =&#8221;\u00A9&#8243;, which would produce the copyright symbol. However, when I [...]]]></description>
			<content:encoded><![CDATA[<p>In a recent project, I wanted to load the Unicode values for special characters from an external XML file to add a special characters panel to the RichTextEditor. I wanted these values to show up in a label or text box using something like label.htmlText =&#8221;\u00A9&#8243;, which would produce the copyright symbol. However, when I loaded the values from a external XML file, the resulting label showed the literal value&#8221;\u00A9&#8243; instead of the copyright symbol. </p>
<p>I created a test application and found that locally created XML vars work and local strings work, but not loaded values from the external XML file. In my test application I was using this XML code:</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&lt;</span>character<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>data<span style="color: #66cc66;">&gt;</span>\\u00A9<span style="color: #66cc66;">&lt;/</span>data<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>label<span style="color: #66cc66;">&gt;</span>Inverted Exclamation Mark<span style="color: #66cc66;">&lt;/</span>label<span style="color: #66cc66;">&gt;</span><br />
<span style="color: #66cc66;">&lt;/</span>character<span style="color: #66cc66;">&gt;</span></div></td></tr></tbody></table></div>
<p>However, Gordon Smith from the <a href="http://groups.yahoo.com/group/flexcoders/">Flex Coders</a> forum pointed out that &#8220;\u00A9&#8243; is ActionScript syntax and that Flex E4X apparently has a bug which will not treat the \u as an escape sequence in an XML literal (this is Gordon&#8217;s lingo, not mine, hehe).  Gordon suggested that I use the XML entity syntax:</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&lt;</span>character<span style="color: #66cc66;">&gt;</span><br />
&nbsp; &nbsp;<span style="color: #66cc66;">&lt;</span>data<span style="color: #66cc66;">&gt;&amp;</span><span style="color: #808080; font-style: italic;">#x00A9;&lt;/data&gt;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&lt;</span>label<span style="color: #66cc66;">&gt;</span>Inverted Exclamation Mark<span style="color: #66cc66;">&lt;/</span>label<span style="color: #66cc66;">&gt;</span><br />
<span style="color: #66cc66;">&lt;/</span>character<span style="color: #66cc66;">&gt;</span></div></td></tr></tbody></table></div>
<p>I updated my XML with the new syntax and everything worked great.   I doubt I could have tracked this issue down myself, it was literally driving me nuts.   I am not sure if I have discovered a bug in E4X, but I certainly hope others don&#8217;t run into this same issue.   Many thanks to Gordon Smith on Flex Coders for all his help.  You can view my test application and source code <a href="http://thanksmister.com/xmlunicode/index.html">here</a> and the Flex Coder discussion at this <a href="http://groups.yahoo.com/group/flexcoders/message/46726">link</a>.  </p>
<p><map name='google_ad_map_15_1452acacd61817fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/15?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_15_1452acacd61817fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=15&amp;url= http%3A%2F%2Fwww.thanksmister.com%2Findex.php%2Farchive%2Fbringing-special-characters-into-flex-with-xml%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.thanksmister.com/index.php/archive/bringing-special-characters-into-flex-with-xml/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Binding Complex XML to a DataGrid in Flex (Redux)</title>
		<link>http://www.thanksmister.com/index.php/archive/binding-complex-xml-to-a-datagrid-in-flex-2/</link>
		<comments>http://www.thanksmister.com/index.php/archive/binding-complex-xml-to-a-datagrid-in-flex-2/#comments</comments>
		<pubDate>Mon, 31 Jul 2006 17:10:19 +0000</pubDate>
		<dc:creator>Mister</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://thanksmister.com/?p=8</guid>
		<description><![CDATA[Most binding examples work with a flat XML structure. However, in most cases the format of the data will not work directly with Flex components. I was looking for a way to bind complex XML to a DataGrid in Flex 2. I ran across a post by Brandon Purcell dealing with the same subject but [...]]]></description>
			<content:encoded><![CDATA[<p>Most binding examples work with a flat XML structure. However, in most cases the format of the data will not work directly with Flex components.  I was looking for a way to bind complex XML to a DataGrid in Flex 2.   I ran across a post by <a target="_blank" title="Brandon Purcell" href="http://thanksmister.com/bpurcell.org">Brandon Purcell</a> dealing with the same subject but his post was a little out of date and no longer worked in Flex 2.  There was also some talk on <a target="_blank" title="Flash Coders Forum" href="http://groups.yahoo.com/group/flexcoders/">Flash Coders</a> about complex XML and  using the labelFunction to bind it to the DataGrid, but I could not find a complete example.    So I created a working example using the similar data.</p>
<p>I ran into some difficulty at first when I placed the labelFunction inside the DataGridColumn.  If you don&#8217;t pass column:DataGridColumn to the myLabelFunc, the DataGrid will not show up. You can view the example <a target="_blank" title="XML DataGrid Binding Example" href="http://thanksmister.com/xmldatagrid/index.html">here</a>, right-click to view the source code. For a detailed discussion, please visit Brandon&#8217;s <a target="_blank" title="Binding Complex XML to Datagrid" href="http://www.bpurcell.org/blog/index.cfm?mode=entry&#038;entry=1020">original post</a>.</p>
<p><map name='google_ad_map_8_1452acacd61817fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/8?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_8_1452acacd61817fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=8&amp;url= http%3A%2F%2Fwww.thanksmister.com%2Findex.php%2Farchive%2Fbinding-complex-xml-to-a-datagrid-in-flex-2%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.thanksmister.com/index.php/archive/binding-complex-xml-to-a-datagrid-in-flex-2/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Flex: Phoenix Traffic Cams</title>
		<link>http://www.thanksmister.com/index.php/archive/phoenix-traffic-cams/</link>
		<comments>http://www.thanksmister.com/index.php/archive/phoenix-traffic-cams/#comments</comments>
		<pubDate>Thu, 27 Jul 2006 22:20:45 +0000</pubDate>
		<dc:creator>Mister</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[ADOT]]></category>
		<category><![CDATA[Arizona]]></category>
		<category><![CDATA[Cams]]></category>
		<category><![CDATA[Phoenix]]></category>
		<category><![CDATA[screen scraping]]></category>
		<category><![CDATA[Traffic]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://thanksmister.com/?p=5</guid>
		<description><![CDATA[Phoenix Traffic Cams is a Flex application using traffic cam data from the Arizona Department of Transportation.]]></description>
			<content:encoded><![CDATA[<p><a title="Phoenix Traffic Cams" target="_blank" href="http://thanksmister.com/phoenixtraffic/index.html">Phoenix Traffic Cams</a> is a Flex application using traffic cam data from the <a title="Arizona Department of Transportation" target="_blank" href="http://az511.com">Arizona Department of Transportation</a>.  This was one of my very first Flex projects and  the application is still rocking after 4 years of service, it also happens to be the very first post for this blog.  I am surprised that ADOT hasn&#8217;t asked to have the code or remove it entirely, it&#8217;s certainly better than there current interface. </p>
<p>Currently, only 5 of the 7 major freeways are implemented at this time.    If you have ever visited the ADOT traffic cam site, you would know that the Flex application is a great improvement upon the looks and functionality of that site. We are basically doing a screen scrape to get the needed information, along with some XML to create the menu and list of cameras.   </p>
<p>This application was created by <a title="Larry Drolet" target="_blank" href="http://www.linkedin.com/pub/larry-drolet/4/b87/370">Larry Drolet</a> and myself during our Flex training session at <a title="Almer/Blank Warehouse Training Facility" target="_blank" href="http://almerblank.com">Almer/<span id="st" class="st">Blank</span> Warehouse <span id="st" class="st">Training</span> Facility</a> in Los Angeles. Ah, good times <img src='http://www.thanksmister.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p><a title="Phoenix Traffic Cams" target="_blank" href="http://thanksmister.com/phoenixtraffic/index.html"><img border="0" align="bottom" title="PHT Snapshot" alt="PHT Snapshot"  src="http://thanksmister.com/phoenixtraffic/images/ptc.jpg" /></a></p>
<p><map name='google_ad_map_5_1452acacd61817fb'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/5?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_5_1452acacd61817fb' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=5&amp;url= http%3A%2F%2Fwww.thanksmister.com%2Findex.php%2Farchive%2Fphoenix-traffic-cams%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.thanksmister.com/index.php/archive/phoenix-traffic-cams/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
