C# Éú³ÉXMLÎļþ£¬ÔÚÏßµÈ - .NET¼¼Êõ / C#
ÈçºÎÓÃC#Éú³ÉÈçϵÄXMLÎļþ
<?xml version="1.0" encoding="GB2312"?>
<Body>
<Head fsfid=¡± ¡± jsfid=¡±CWS00001¡± sjblx£½¡±0001¡± voucher =¡±xxxxxxxxxxxxxx¡±/>
<Data>
<Item objectid£½¡°CWS00001¡± starttime=¡°20060328123554¡± endtime£½¡°20060328123654¡±>
<Content pollutant_code ="co"/>
<Content pollutant_code ="FRA"/>
</Item>
</Data>
</Body>
Çë¸ø³öÏêϸ´úÂë
C# code:
.....
string strxml = @"<?xml version=""1.0"" encoding=""GB2312""?>
<Body>
<Head fsfid=¡± ¡± jsfid=¡±CWS00001¡± sjblx£½¡±0001¡± voucher =¡±xxxxxxxxxxxxxx¡±/>
<Data>
<Item objectid£½¡°CWS00001¡± starttime=¡°20060328123554¡± endtime£½¡°20060328123654¡±>
<Content pollutant_code =""co""/>
<Content pollutant_code =""FRA""/>
</Item>
</Data>
</Body>
";
XmlDocument xd = new XmlDocument();
xd.LoadXml(strxml);
xd.Save(@"D:\aaa.xml");
1Â¥£¬ÄãдµÄÎÒ¿´²»¶®£¬ÏêϸµãºÃÂð
ËûдµÄºÜÏêϸÁË ½¨ÒéÄã×Ô¼ºÈ¥¿´Ï xmlµÄ¶Áд
LZµÄÒâ˼ºÃÏñÊÇÔõô·ÖÊ÷¡£¡£Ôõô·
Ïà¹ØÎÊ´ð£º
txt ºÍXML ¸ñʽÏàÓ¦
²»½èÖúDataSet
µ¼Èë¶ÁÈ¡TXTÎļþ
È»ºóÖ±½ÓдÈëXML(ͬһÎļþ,²»Í¬Êý¾Ý,µÝÔöÔÊý¾ÝûÓб»¸²¸ÇÇé¿öÏÂÔö¼ÓÊý¾Ý.)
½Ì¸öÒªµã»ò×îºÃÊÇÓиö´úÂëÌáʾµÄ
¹ý·ºÃºº °ï¸öæÈö^^
²»»á£¬°ïÂ¥Ö÷ ......
Private Sub Command1_Click()
Dim MyString() As String
Open "a.xml" For Binary As #1 ' ´ò¿ª¸Õ´´½¨µÄÎļþ¡£
ReDim MyString(LOF(1) - 1)
Put #1, , MyRecord ' ¶ÁÈëËùÓÐ×Ö·ûµ½±äÁ¿ÖÐ ......
ÏÖÔÚÓиöxmlÎļþÊÇ<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xm ......
ʹÓÃACCESS×î´óµÄÒþ»¼¾ÍÊDz»°²È«¡£½ñÌì¶ÔACCESSÊý¾Ý¿âÉèÖÃÁËÒ»¸öÃÜÂ룬±ØÐëʹÓÃÃÜÂë²ÅÄÜ´ò¿ª£¬µ«ÊÇÔÚ³ÌÐòÖÐÈ´ÎÞ·¨Á¬½ÓÊý¾Ý¿âÁË¡£´ó¼ÒÖªµÀʹÓÃÓû§ÃûºÍÃÜÂ룬ÈçºÎÁ¬½ÓACCESSÊý¾Ý¿â£¿Ã²ËÆACCESSµÄÓû§Ãû»¹²»ÖªµÀ£¿Ö»Öª ......
¹¦ÄÜ˵Ã÷:Java servlet °ÑXMLÊý¾ÝѹËõºó·¢Ë͵½PBÓû§¶Ë,PBÊÕµ½Êý¾Ýºó½âѹ³öÀ´.
´«ÊäÒª¾¹ýBase64±àÂë.
ÎÊÌâÊÇ:ÄÜÊÕµ½Êý¾Ýµ«Êǽâѹ²»³öÀ´.ÏëÇë½Ì´ó¼Ò»òÕßÓÐʲôºÃµÄ°ì·¨?
PB¿ÉÒÔÓÃ"zlibwapi.DLL" ½âѹ
......