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+=">";
//
Ïà¹ØÎĵµ£º
//»ñÈ¡Êý¾Ý¿âÊý¾Ý·µ»Ølist
public List queryAll(int fcateId) {
List list = new ArrayList();
String sql = "select * from g_Account where fCateID=? order by fCode";
Connection con = SqlHelp.getConn();//»ñµÃÁ¬½Ó£¬sqlhelp×Ô¼ºÐ´µÄ¹¤¾ßÀà
PreparedStatement pst = null;
ResultSet rs = null;
......
flex ÕýÔò±í´ïʽѧϰ×ÊÁÏ
Ò»°ãÀ´Ëµ¸÷¸ö¿ª·¢»·¾³»òÕßÓïÑÔ¶ÔÓÚÕýÔò±í´ïʽµÄ
ʵÏÖ²»ÊÇÍêÈ«Ò»ÑùµÄ£¬µ«ÊDzî±ð¶¼·Ç³£Ï¸Î¢¡£AS3°´ÕÕECMA262±ê׼ʵÏÖÕýÔò±í´ïʽ£¬¸Ð¾õ°ïÖúÎĵµ¶ÔÕⲿ·Ö½éÉܵ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 ¶ÔÏóÄ£Ðͽ«ÏÔʾ°üº¬¿Õ°××Ö·ûµÄ TEXT ½Úµã¡£¿Õ°××Ö·û±»½Ø¶Ïºó£¬¶à°ë»á´øÀ´Ò»Ð©»ìÂÒ¡£ÀýÈçÏÂÃæµÄ XML Àý×Ó£º
¡¡¡¡]>
¡¡¡¡Smith
¡¡¡¡John
¡¡¡¡Éú³ÉÏÂÁÐÊ÷£º
¡¡¡¡Processing Instruction: xml
¡¡¡¡DocType: person
¡¡¡¡ELEMENT: person ......
XMLÏÖÔÚÒѾ³ÉΪһÖÖͨÓõÄÊý¾Ý½»»»¸ñʽ,ËüµÄƽ̨ÎÞ¹ØÐÔ,ÓïÑÔÎÞ¹ØÐÔ,ϵͳÎÞ¹ØÐÔ,¸øÊý¾Ý¼¯³ÉÓë½»»¥´øÀ´Á˼«´óµÄ·½±ã¡£¶ÔÓÚXML±¾ÉíµÄÓ﷨֪ʶÓë¼¼Êõϸ½Ú,ÐèÒªÔĶÁÏà¹ØµÄ¼¼ÊõÎÄÏ×,ÕâÀïÃæ°üÀ¨µÄÄÚÈÝÓÐDOM(Document Object Model),DTD(Document Type Definition),SAX(Simple API for XML),XSD(Xml Schema Definition),XSLT(Exten ......