Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

flex xmlºÍarraycollectionÏ໥ת»»

1¡¢arraycollectionת»¯Îªxml£¬´úÂëÈçÏ£º
    
    //¶¯Ì¬Éú³ÉÊ÷Ðνṹ
public static function flatArrayToXML(arr:Object,rootname:String=null,nodename:String=null, outputString:Boolean=false):Object{
if (arr is Array){

}else if ( arr is ArrayCollection){
arr= ArrayCollection(arr).source;
}else if (arr == null){
return null;
}
if (rootname==null) rootname="root";
var xmlstr:String="<"+rootname+" "+"label='ÌײÍÏîÄ¿'>";
var xmlList:XMLList=new XMLList();
var alength:int=arr.length;
if (alength > 0)
{
for (var i:int=0; i < alength; i++)
{
xmlstr+=objToSimpXML(arr[i].name,0,nodename,true);
}
xmlstr +="</"+nodename+">";
}
}
}
xmlstr+="</"+rootname+">";
trace(xmlstr);
var xmldoc:XMLDocument=new XMLDocument(xmlstr);
if (outputString==true)
return xmldoc==null ? "": xmldoc.toString();
var xml:XML=new XML(xmldoc);
return xml;
}

//½«¶ÔÏóת»»Îª¼òµ¥xml.<node property1='value1' property2='value2'/>ÕâÖÖÐÎʽ
//objת»»Ô´¶ÔÏó,½öÖ§³Ö¼òµ¥¶ÔÏó,Èç¹û¶ÔÏóµÄÊôÐÔÒ²ÊÇÒ»¸ö¶ÔÏóÔò²»½øÈëµÝ¹é,
//nodename¿ÉÒÔ×Ô¶¨Òå½ÚµãÃû³Æ, ĬÈÏÊÇ"node"
//ÊÇ·ñÊä³öΪ×Ö·û´®, ĬÈÏת»»Îªxml, Èç¹ûΪtrueÔò½«xml±äΪ×Ö·û´®
//return ÖµÀàÐ͸ù¾ÝoutputString À´¾ö¶¨, ¿ÉÄÜÊÇXML,¿ÉÄÜÊÇString
public static function objToSimpXML(ri_name:String,nodeorchild:int, nodename:String=null, outputString:Boolean=false):String{
if(ri_name==null) return null;
if (nodename==null)nodename="node";//½ÚµãÃû×Ö
var str:String="<"+nodename;
str+=" label='"+filterXMLString(ri_name)+"'";½ÚµãÖÐÊôÐÔµÄÃû×Ö
nodeorchild == 1?str+="/>":str+=">";
//


Ïà¹ØÎĵµ£º

Flex±íµ¥ÖлسµÏÂÒƽ¹µãµÄ·½·¨

¶ÔÓÚÏ°¹ßÁËʹÓÃ×ÀÃæÓ¦ÓóÌÐòµÄÓû§¶øÑÔ£¬»Ø³µºóÏÂÒƽ¹µãµ½ÏÂÒ»¸ö±à¼­×é¼þÖеÄС¹¦ÄÜ£¬ÊǷdz£ÌùÐĵģ¬ÀûÓÃflexÖеÄKEY_DOWNʼþ¿ÉÒÔ·½±ãµÄʵÏֻسµÏÂÒƽ¹µã£¬´úÂëÈçÏ£º
 <?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplet ......

ËÄÑÛ¿´ÊÀ½ç XMLÓï·¨


XML (EXtensible Markup Language)
XML is a
cross-platform, software and hardware independent tool for transmitting
information.
Prolog
XML
Declaration
Processing
Instructions
DOCTYPE
Declaration
Elements
Attributes
XML
Comments
CDATA
Sections
Character
and Entity Refere ......

XMLÈëÃŵij£¼ûÎÊÌâ(¶þ)

Internet Explorer 5.0 ¶Ô XML ÌṩÄĸö¼¶±ðµÄÖ§³Ö£¿
¡¡¡¡Internet Explorer 5 ÌṩÏÂÁÐ XML Ö§³Ö£º
¡¡¡¡Ö±½Ó²é¿´ XML¡£Microsoft XML ʵÏÖÔÊÐíÓû§Í¨¹ýËûÃÇµÄ Web ä¯ÀÀÆ÷ʹÓà XSL »òÕß²ãµþÑùʽ±í (CSS) ²é¿´ XML£¬¾ÍÏó²é¿´ HTML ÎĵµÒ»Ñù¡£
¡¡¡¡¸ßÐÔÄÜ¡¢ÑéÖ¤ XML ÒýÇæ¡£Internet Explorer 4.0 ¿ª·¢ÈËÔ±ÊìϤµÄ XML ÒýÇ ......

XML½âÎö·½·¨½²½â

XMLÏÖÔÚÒѾ­³ÉΪһÖÖͨÓõÄÊý¾Ý½»»»¸ñʽ,ËüµÄƽ̨ÎÞ¹ØÐÔ,ÓïÑÔÎÞ¹ØÐÔ,ϵͳÎÞ¹ØÐÔ,¸øÊý¾Ý¼¯³ÉÓë½»»¥´øÀ´Á˼«´óµÄ·½±ã¡£¶ÔÓÚXML±¾ÉíµÄÓ﷨֪ʶÓë¼¼Êõϸ½Ú,ÐèÒªÔĶÁÏà¹ØµÄ¼¼ÊõÎÄÏ×,ÕâÀïÃæ°üÀ¨µÄÄÚÈÝÓÐDOM(Document Object Model),DTD(Document Type Definition),SAX(Simple API for XML),XSD(Xml Schema Definition),XSLT(Exten ......

Sqlserver£º´ÓXMLÎļþÖжÁÈ¡ÅäÖÃÐÅÏ¢

ÈçºÎÔÚSqlserverÖдÓÍⲿXMLÎļþÖжÁÈ¡ÅäÖÃÐÅÏ¢ÄØ£¿¸ÃÎÊÌâÔ´×ÔÒ»¼ÒÆóÒµµÄ±ÊÊÔÐÅÏ¢ÓиС£
Ò»xmlÎļþÄÚÈÝ£º
<?xml version="1.0" encoding="utf-8"?>
<root>
  <db name="ClientDB1" datasize="512MB" datagrowth="100MB" logsize="100MB" loggrowth ="50MB">
  </db>
  <db ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ