flex ²Ù×÷xml ʵÏÖÔöɾ¸Ä²é
Ïêϸ½éÉÜFlexÖвÙ×÷XML(ÉÏ)
2009Äê12ÔÂ30ÈÕ ÐÇÆÚÈý 12:05
Ò» ÔÚ½éÉÜFlexÖвÙ×÷XML֮ǰ£¬Ê×Ïȼòµ¥½éÉÜÏÂXMLÖеĻù±¾ÊõÓï¡£
ÔªËØ£ºXMLÖÐÓµÓпªÊ¼±êÇ©ºÍ½áÊø±êÇ©µÄÕâÒ»¿é³ÆΪ“ÔªËØ”
½Úµã£º°ÑXMLÔªËØÓëÎı¾½áºÏÆðÀ´Í³³ÆΪ½Úµã
¸ù½Úµã£ºÎ»ÓÚÕû¸öXMLÎĵ±¶¥¶ËµÄ½Úµã
Îı¾½Úµã£º°üº¬Îı¾µÄ½Úµã
ÊôÐÔ£ºÔªËصÄ×é³É²¿·Ö£¬ÒÔ¼ü/ÖµÐÎʽ·ÅÔÚÔªËرêÇ©ÄÚ
ÓÃÒ»¸öÀý×ÓÀ´ËµÃ÷
view plaincopy to clipboardprint?
<root_node><!--ÕâÊÇÒ»¸ö¸ù½ÚµãÒ²ÊÇÒ»¸öÔªËØ-->
<node attribute="value"><!--ÕâÊÇÒ»¸ö½ÚµãÒ²ÊÇÒ»¸öÔªËØ£¬ÆäÖаüº¬ÓÐÊôÐÔ"attribute"-->
text node<!--ÕâÊÇÒ»¸öÎı¾½Úµã-->
</node>
</root_node>
<root_node><!--ÕâÊÇÒ»¸ö¸ù½ÚµãÒ²ÊÇÒ»¸öÔªËØ-->
<node attribute="value"><!--ÕâÊÇÒ»¸ö½ÚµãÒ²ÊÇÒ»¸öÔªËØ£¬ÆäÖаüº¬ÓÐÊôÐÔ"attribute"-->
text node<!--ÕâÊÇÒ»¸öÎı¾½Úµã-->
</node>
</root_node>
XML¼òµ¥½éÉÜÍêÁË£»Ö®ºó£¬½«·Ö±ð½éÉÜXML¶ÔÏóµÄ´´½¨£¬XML¶ÔÏóµÄ´¦ÀíÒÔ¼°XML¶ÔÏóµÄÔËÓá£
¶þ FlexÖд´½¨XML¶ÔÏó
FlexÖд´½¨XML¶ÔÏóµÄ·½·¨ÓкܶàÖÖ£¬¿ÉÒÔ¸ù¾Ý¸ÃXML¶ÔÏóµÄÓÃ;À´¾ö¶¨Ê¹ÓÃÄÄÖÖ·½·¨
1.´´½¨Ò»¸öXML¶ÔÏó£¬Ö±½Ó°ÑXMLÎı¾¸³¸øÕâ¸ö¶ÔÏó
view plaincopy to clipboardprint?
var textXmlObj:XML = <test><element>text</element></test>;
var textXmlObj:XML = <test><element>text</element></test>;
×¢Ò⣺ÕâÀïµÈºÅÓұߵıí´ïʽ²»ÓüÓÉÏÒýºÅ£¬ÒòΪASÈÏʶËü£¬ÖªµÀËüÊÇÒ»¸öXML£¬Èç¹û¼ÓÉÏÒýºÅ¾Í³ÉÁËStringÀàÐÍÁË£¬±àÒëÒ²ÎÞ·¨Í¨¹ý¡£
µ±È»Ò²¿ÉÒÔ¶¯Ì¬µÄ¾ö¶¨XMLÎı¾ÖеÄÄÚÈÝ£¬ÓÃ"{±äÁ¿}"µÄ·½Ê½²åÈëµ½XM
Ïà¹ØÎĵµ£º
Input.xml-----------
<?xml version="1.0" encoding="gb2312"?>
<studentList>
<student sex="man">
<name>wgy</name>
<age>23</age>
<tel>12345678</tel>
</student>
<student sex="female">
<name>lemon</name&g ......
ƽʱ×öÓÎÏ·¿ª·¢µÄʱºò£¬ºÜ´ó³Ì¶ÈÉ϶¼»á²ÉÓÃxmlÀ´×öÅäÖÃÎļþ¡£ÓÐʱºòÐèҪдºÜ¶à£¬È»ºóÓÖÐèÒªÒÀ´ÎÈ¥½âÎö¡£Èç¹ûÓÐÒ»¸ö¹¤¾ßÀ´×Ô¶¯½âÎöÿһ¸öxml£¬²¢ÇÒÌáÈ¡³ö×Ô¼ºÐèÒªµÄÊý¾Ý£¬¶àºÃѽ¡£ËùÒÔ͵Á˸öÀÁ£¬Ð´ÁËÒ»¸ö½âÎöÒ»¶¨¸ñʽµÄxmlºÍ½âÎöÀ࣬°ÑÕâ¸ö¸ñʽ¶ª¸ø²ß»®×Ô¼ºÈ¥µ÷ÕûÊý¾ÝÀ²¡£Í¬Ê±×Ô¼ºÕâ±ßÖ»ÐèÒª½ÓÊÜÏֳɵÄÀà
×¢Ò⣬ÕâÀïµÄÖ¸µÄÀ ......
1¡¢mian.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="HTTPSrv.send();" width="242" height="442">
<mx:Script>
<!--[CDATA[
import mx.rpc.events.ResultEv ......
ת×Ô£ºhttp://www.cnblogs.com/sharplife/archive/2007/09/03/880641.html
×î½ü¿´Ê±Ñ§Ï°FlexÓ¦Ó㬿ªÊ¼¶ÔFlexºÍFlashµÄ¹ØϵÓÐЩģºý£¬¶ÁÁËOreillyµÄProgramming Flex
2²ÅËãÊÇÃ÷°×Щ£¬ÏÖ¼ÇÏ¡£
1¡¢FlexÓ¦ÓóÌÐòµÄÉúÃüÖÜÆÚ
FlexÓ¦ÓþÍÆä¸ù±¾ÉϽ²¾ÍÊÇFlashÓ¦Óã¬Ö»²»¹ýÆäÊÇ»ùÓÚFlex
Framework£¨ÓÉActionScriptд¾Í£©¿ª· ......
ÓÉÓÚFlex Builder compiler shellÓÐmemory leakµÄÎÊÌ⣬ ¶øSDKĬÈÏµÄµÄ JVM heap size Ö»ÓÐ312M£¬µ±compile±È½Ï´óµÄprojectÈÝÒײ»¹»£¬ËùÒÔÖ»ÒªÐÞ¸ÄSDKµÄJVM²ÎÊý¾Í¿ÉÒÔ¡£
±à¼ {Flex SDK}/bin/jvm.config ÎļþÈçÏ¡£
java.args=-Xmx512m ...
Èç¹û»¹ÊÇÓÐError£¬¿ÉÒÔÔö¼Óµ½1024»òÕ߸ü¶à¡£ ......