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
Ïà¹ØÎĵµ£º
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Ó¦ÓÃËùÐèµ ......
MSSQL:
declare @begin datetime
declare @End datetime
set @begin=getdate()
--Ö´ÐеÄÓï¾äдÔÚÕâÀï
set @End=getdate()
select datediff(millisecond,@begin,@End) as Ö´ÐеÄʱ¼ä
--millisecond±íʾºÁÃë Èç¹û¿´Ãë¿ÉÒÔʹÓÃss
C#:
ºÜ¶àʱº ......
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 ......
ÔÚservice(spring)ÖÐÍê³É
step 1:
´ò¿ªÒ»¸ösession
д sql Óï¾ä£¬
×¢Òâµã£ºÐ´sqlÓï¾äʱ,Ëù²éѯµÄÊÔͼΪ£ºkangaroo_VW_UnitView£¬´ËÊÔͼµÄÉú³É
ÓÐ kangaroo_unit±í×óÁ¬½Óµ½kangaroo_img±í¶øÉú³É¡£
step 2:
°ÑËù²éѯµÄ·ûºÏÌõ¼þµÄ¼¯ºÏ·ÅÈëÁÙʱµÄArrayListÖУ¬²¢¶ÔÁÙʱµÄArrayList½øÐÐ
µü´ú¡£
step 3:
°Ñµü´ú³öÀ´µÄ¼¯ ......
ÓÃ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( ......