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

c#xmlµÄÔöɾ¸Ä²é


ÒÑÖªÓÐÒ»¸öXMLÎļþ£¨bookstore.xml£©ÈçÏ£º  
  <?xml   version="1.0"   encoding="gb2312"?>  
  <bookstore>  
      <book   genre="fantasy"   ISBN="2-3631-4">  
          <title>Oberon's   Legacy</title>  
          <author>Corets,   Eva</author>  
          <price>5.95</price>  
      </book>  
  </bookstore>  
     
  1¡¢Íù<bookstore>½ÚµãÖвåÈëÒ»¸ö<book>½Úµã£º  
        XmlDocument   xmlDoc=new   XmlDocument();  
        xmlDoc.Load("bookstore.xml");  
        XmlNode   root=xmlDoc.SelectSingleNode("bookstore");//²éÕÒ<bookstore>  
        XmlElement   xe1=xmlDoc.CreateElement("book");//´´½¨Ò»¸ö<book>½Úµã  
        xe1.SetAttribute("genre","ÀîÔÞºì");//ÉèÖøýڵãgenreÊôÐÔ  
        xe1.SetAttribute("ISBN","2-3631-4");//ÉèÖøýڵãISBNÊôÐÔ  
     
        XmlElement   xesub1=xmlDoc.CreateElement("title");  
        xesub1.InnerText="CS´ÓÈëÃŵ½¾«Í¨";//ÉèÖÃÎı¾½Úµã  
        xe1.AppendChild(xesub1);//Ìí¼Óµ½<book>½ÚµãÖÐ  
        XmlElement   xesub2=xmlDoc.CreateElement("author");  
        xesub2.InnerText="ºò½Ý";  
        xe1.AppendChild(xesub2);  
        XmlElement   xesub3=xmlDoc.CreateElement("price");  
        xesub3.InnerText="58.3";  
        xe1.AppendChild(xesub


Ïà¹ØÎĵµ£º

ʵÀýÆÊÎöxmlÓ¦Óã¨1£©

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
 //µ¼ÈëʹÓÃxmlÓ¦ÓÃËùÐèµ ......

ÈçºÎ¼ÆËãMS SQLÓï¾äÖ´ÐеÄʱ¼ä»¹ÓÐc#


MSSQL:
declare @begin datetime
declare @End datetime
set @begin=getdate()
   --Ö´ÐеÄÓï¾äдÔÚÕâÀï
set @End=getdate()
select datediff(millisecond,@begin,@End) as Ö´ÐеÄʱ¼ä
--millisecond±íʾºÁÃë Èç¹û¿´Ãë¿ÉÒÔʹÓÃss
C#:
ºÜ¶àʱº ......

delphi Éú³Éxml ·½·¨ Óë delphi txtÎļþ²Ù×÷

Procedure TForm1.Button1Click(Sender: TObject);
Var
xmlstr,FileName: String;
f: Textfile;
Begin
xmlStr := '<?xml version="1.0" encoding="gb2312"?>';
xmlstr := xmlstr + '<user><name>ÕÅÈý</name><sex>ÄÐ</sex></user>';
sh ......

¸üРxml²½Öè

ÔÚservice(spring)ÖÐÍê³É
step 1:
´ò¿ªÒ»¸ösession
д sql Óï¾ä£¬
×¢Òâµã£ºÐ´sqlÓï¾äʱ,Ëù²éѯµÄÊÔͼΪ£ºkangaroo_VW_UnitView£¬´ËÊÔͼµÄÉú³É
ÓÐ kangaroo_unit±í×óÁ¬½Óµ½kangaroo_img±í¶øÉú³É¡£
step 2:
°ÑËù²éѯµÄ·ûºÏÌõ¼þµÄ¼¯ºÏ·ÅÈëÁÙʱµÄArrayListÖУ¬²¢¶ÔÁÙʱµÄArrayList½øÐÐ
µü´ú¡£
step 3:
°Ñµü´ú³öÀ´µÄ¼¯ ......

Flex¶ÁÈ¡ÍⲿXMLÖÐÎÄÂÒÂë½â¾ö°ì·¨

ÓÃURLLoader¼ÓÔØXML£¬È»ºó½«dataת»¯ÎªByteArray
ÓÃbyteArray.readMultiByte(bytes.length,"utf-8")
È»ºó½«×ª»¯ºóµÄ×Ö·û´®ÔÙÇ¿ÖÆ×ª»¯ÎªXML
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.Binary;
var urlRequest:URLRequest = new URLRequest(source);
loader.addEventListener( ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ