<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2340315369911251902</id><updated>2011-11-27T17:02:35.839-08:00</updated><title type='text'>How can I edit MXML files with Eclipse?</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://flexiglas.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2340315369911251902/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://flexiglas.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ali Mansuroglu</name><uri>http://www.blogger.com/profile/02592238732522494263</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp3.blogger.com/_poxLSjJxahg/R7R52Cmd42I/AAAAAAAAAAY/BDgbUVDXOQM/S220/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2340315369911251902.post-3626305583104119355</id><published>2008-02-14T05:25:00.000-08:00</published><updated>2008-12-11T23:02:05.105-08:00</updated><title type='text'>How can I edit MXML files with Eclipse?</title><content type='html'>&lt;p&gt;Flex is a very powerful Framework for RIA development. You can write mxml files in xml syntax and compile them to Flex-Applications using mxmlc (mxml compiler) shipped with Flex-SDK. Eclipse (and many other Editors can handle XML-Files) provides code-completion for XML-Files once you have specified a XML-Schema or DTD. Editors with code-completion accelerate the learning process and speed up the development.&lt;/p&gt;&lt;p&gt;Unfortunately there is nowhere a XML-Schema for mxml since Flex 2 (except &lt;a href="http://code.google.com/p/xsd4mxml/"&gt;http://code.google.com/p/xsd4mxml/&lt;/a&gt; ;-) ). The solution is to write some ActionScript classes to generate the XML-Schema.&lt;/p&gt;&lt;p&gt;To do this you need the list of components, which should appear in the XML-Schema. Either extract this from each catalog.xml file located in swc files in &lt;b&gt;&amp;lt;FLEX_HOME&amp;gt;/frameworks/libs&lt;/b&gt; directory or simply take the &lt;b&gt;&amp;lt;FLEX_HOME&amp;gt;/frameworks/mxml-manifest.xml&lt;/b&gt; file which contains the same information allready.&lt;/p&gt;&lt;pre style="color: rgb(0, 0, 255);"&gt;&lt;br /&gt;&lt;b&gt;catalog.xml&lt;/b&gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;component className="mx.collections:ArrayCollection"&lt;br /&gt;name="ArrayCollection" uri="http://www.adobe.com/2006/mxml" /&amp;gt;&lt;br /&gt;&amp;lt;component className="mx.collections:ListCollectionView"&lt;br /&gt;name="ListCollectionView" uri="http://www.adobe.com/2006/mxml" /&amp;gt;&lt;br /&gt;&amp;lt;component className="mx.collections:Sort"&lt;br /&gt;name="Sort" uri="http://www.adobe.com/2006/mxml" /&amp;gt;&lt;br /&gt;&amp;lt;component className="mx.collections:SortField"&lt;br /&gt;name="SortField" uri="http://www.adobe.com/2006/mxml" /&amp;gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;mxml-manifest.xml&lt;/b&gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;component id="Accordion" class="mx.containers.Accordion"/&amp;gt;&lt;br /&gt;&amp;lt;component id="AddChildAction" class="mx.effects.AddChildAction"/&amp;gt;&lt;br /&gt;&amp;lt;component id="AnimateProperty" class="mx.effects.AnimateProperty"/&amp;gt;&lt;br /&gt;&amp;lt;component id="Application" class="mx.core.Application"/&amp;gt;&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;!Notice!&lt;/b&gt; your generator application should include the libraries contains the component.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Once you have a List of components, actually a XML-File with full qualified class names, you can use &lt;code&gt;flash.utils.getDefinitionByName()&lt;/code&gt; and &lt;code&gt;flash.utils.describeType()&lt;/code&gt; functions to reflect the information needed to generate the XML-Schema. This functions doesn't deliver all information you need to generate the XML-Schema because of the default compiler options in &lt;b&gt;&amp;lt;FLEX_HOME&amp;gt;/frameworks/flex-config.xml&lt;/b&gt;. You should edit the flex-config.xml and append following&lt;br /&gt;lines.&lt;/p&gt;&lt;br /&gt;&lt;pre style="color: rgb(0, 0, 255);"&gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;keep-as3-metadata&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;Bindable&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;Managed&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;ChangeEvent&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;NonCommittingChangeEvent&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;Transient&amp;lt;/name&amp;gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&amp;lt;name&amp;gt;Event&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;Style&amp;lt;/name&amp;gt;&lt;/b&gt;&lt;br /&gt;&amp;lt;/keep-as3-metadata&amp;gt;&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/xsd4mxml/"&gt;http://code.google.com/p/xsd4mxml/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_poxLSjJxahg/R7R8JSmd44I/AAAAAAAAAAk/9pbRQWAOxSg/s1600-h/element.png"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_poxLSjJxahg/R7R8JSmd44I/AAAAAAAAAAk/9pbRQWAOxSg/s320/element.png" alt="" id="BLOGGER_PHOTO_ID_5166891171554648962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_poxLSjJxahg/R7R9qymd45I/AAAAAAAAAAs/bvzq3h6F2vM/s1600-h/attribute.png"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_poxLSjJxahg/R7R9qymd45I/AAAAAAAAAAs/bvzq3h6F2vM/s320/attribute.png" alt="" id="BLOGGER_PHOTO_ID_5166892846591894418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;To be continue...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2340315369911251902-3626305583104119355?l=flexiglas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexiglas.blogspot.com/feeds/3626305583104119355/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2340315369911251902&amp;postID=3626305583104119355' title='2 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2340315369911251902/posts/default/3626305583104119355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2340315369911251902/posts/default/3626305583104119355'/><link rel='alternate' type='text/html' href='http://flexiglas.blogspot.com/2008/02/how-can-i-edit-mxml-files-with-eclipse.html' title='How can I edit MXML files with Eclipse?'/><author><name>Ali Mansuroglu</name><uri>http://www.blogger.com/profile/02592238732522494263</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp3.blogger.com/_poxLSjJxahg/R7R52Cmd42I/AAAAAAAAAAY/BDgbUVDXOQM/S220/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_poxLSjJxahg/R7R8JSmd44I/AAAAAAAAAAk/9pbRQWAOxSg/s72-c/element.png' height='72' width='72'/><thr:total>2</thr:total></entry></feed>
