Flexµ÷ÓÃÔ¶³ÌXMLÊý¾Ý
Ê×ÏÈÒªÓÐÒ»¸ö¼òÒ׵ķþÎñÆ÷£¬½¨Á¢Ò»¸öÕ¾µã£¬È»ºóÕ¾µãÏ´æ·Å
1£ºcrossdomain.xml Õâ¸öÊÇ¿çÓëÓò²ßÂÔÎļþ£¬ÓÃÓÚÖ¸¶¨Óòͨ¹ýFlash
Player·ÃÎʱ¾ÓòµÄ×ÊÔ´(Èç¹û·þÎñÆ÷ÔÚ±¾»ú¾ÍûÓÐÕâ¸ö±ØÒª)µ«ÊÇÔ¶³ÌµÄ»°¾ÍÒª(½¨ÒéÒª)
ÎļþÄÚÈÝ£º
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
*ÊÇÖ¸ËùÓеÄÓòͨ¹ý Flash Player¶¼¿ÉÒÔ·ÃÎʱ¾ÓòµÄ×ÊÔ´¡£
2£ºÓÉÓÚÕâ¸öÊÇ×öÓû§µÇ½µÄ£¬ËùÒÔÒªÓÐÒ»¸ölogin.xml¹©ÍâÃæ·ÃÎÊ¡£µ±È»Ãû×Ö¿ÉÒÔËæ±ãÆð¡£
XmlµÄÄÚÈݲο´Í¼Æ¬¡£
´úÂëÒÔ¼°½âÊÍÈçÏÂ
<mx:HTTPService
id="loginRPC" url="http://localhost/login.xml"
result="loginRPCResult(event)"/>
url£º
Ô¶³ÌxmlÎļþµÄurl
Result£º½ÓÊÕ
loginRPCResult(event) ·µ»ØµÄ½á¹û
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
backgroundGradientAlphas="[1.0, 1.0]"
backgroundGradientColors="[#04D99F,
#09B9FA]"
themeColor="#F8FBFD"
verticalAlign="middle" creationComplete="loginRPC.send()">
creationComplete£º³õʼ»°½çÃæʱ´¥·¢£¬loginRPC.send()ÏòÄ¿±ê·þÎñ
Æ÷Ìá³öÇëÇó²¢½ÓÊÕÊý¾Ý¡£
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
[Bindable]
private var loginsList
Ïà¹ØÎĵµ£º
Create:
int nFQ;
XmlDocument doc = new XmlDocument();
XmlAttribute
newAtt;
//¶¨ÒåXMLÎĵµÍ·Îļþ
XmlDeclaration dec =
doc.CreateXmlDeclaration("1.0",null,null);
doc.AppendChild(dec);
&n ......
Query:
XmlDocument doc = new XmlDocument();
doc.Load(Server.MapPath(".\\db\\dbGuest.xml"));
//UserÊÇXML¸ù½Úµã,Name×Ö½Úµã
lbEmail.Text =
doc.SelectSingleNode("//User ......
·Ò룺Çï·ã
Ô´úÂ룺
LoadingXmlInTvMTCode.zip
ÔںܶàÇé¿öϳÌÐòÔ±ÐèÒª²ÉÓöàÏß³ÌÀ´¿ª·¢Ó¦ÓóÌÐò£¬Óû§¿ÉÒÔÔÚǰ̨²Ù×÷Êý¾Ý»òÆäËû¹¤×÷£¬ÔÚºǫ́³ÌÐòÕýÔÚ¼ÓÔغܴóµÄһЩÎļþ£¬¶øÕâÒ»¹ý³Ì²»»áÓ°Ï쵽ǰ̨µÄÓû§¡£ÔÚÕâƪÎÄÕÂÖУ¬ÎÒÀ´½²ÊöÒ»ÏÂÔõÑùͨ¹ý¶à¸öÏß³ÌÀ´¼ÓÔضà¸öÎļþ¡£
ÔÚÕâ¸öÀý×ÓÖÐÎÒÃǽ«À´Ñо¿Õ ......
×òÌìÍíÉÏÒ»Ö±ÔÚ×ÁÄ¥Flex,Ïëͨ¹ýDataGrid°ÑMySQLÀïÃæµÄÊý¾Ý¸ø¶Á³öÀ´£¬ÆÚ¼ä³öÏÖÁ˼¸¸öСÎÊÌ⣬¼Ç¼ÏÂ~~
1.µÚÒ»´Î½øÐÐÁ¬½ÓÊý¾Ý·þÎñ(Data-Connect to Data/Service-PHP-Browse)ʱ,»á³öÏÖ°²×°Zend FrameWork,Ñ¡Ôñok,²»ÒªÊºóÔÙÈ¥ÍøÕ¾ÏÂÔØZendAMF,Õâ¸öÀïÃæ»áÉÙһЩ¶«Î÷.
2.Data-Bind to DataÊ ......
using System;
using System.Xml;
namespace ReadXMLfromFile
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
static void Main(string[] args)
{
XmlTextReader reader = new XmlTextReader ("books.xml");
......