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

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>';
showmessage(xmlstr);
FileName:='a.xml';
If fileExists(FileName) Then DeleteFile(FileName); {¿´ÎļþÊÇ·ñ´æÔÚ,ÔÚ¾Í刪³ý}
AssignFile(F, FileName); {½«ÎļþÃûÓë±äÁ¿ F ¹ØÁª}
ReWrite(F); {´´½¨Ò»¸öеÄÎļþ²¢ÃüÃûΪ ek.txt}
Writeln(F, xmlstr);
Closefile(F); {¹Ø±ÕÎļþ F}
End;
Procedure NewTxt(FileName:String);
Var
F : Textfile;
Begin
if fileExists(FileName) then DeleteFile(FileName); {¿´ÎļþÊÇ·ñ´æÔÚ,ÔÚ¾Í刪³ý}
AssignFile(F, FileName); {½«ÎļþÃûÓë±äÁ¿ F ¹ØÁª}
ReWrite(F); {´´½¨Ò»¸öеÄÎļþ²¢ÃüÃûΪ ek.txt}
Writeln(F, '½«ÄúҪдÈëµÄÎı¾Ð´Èëµ½Ò»¸ö .txt Îļþ');
Closefile(F); {¹Ø±ÕÎļþ F}
End;
Procedure OpenTxt(FileName:String);
Var
F : Textfile;
Begin
AssignFile(F,FileName); {½«ÎļþÃûÓë±äÁ¿ F ¹ØÁª}
Append(F); {ÒԱ༭·½Ê½´ò¿ªÎļþ F }
Writeln(F, '½«ÄúҪдÈëµÄÎı¾Ð´Èëµ½Ò»¸ö .txt Îļþ');
Closefile(F); {¹Ø±ÕÎļþ F}
End;
Procedure ReadTxt(FileName:String);
Var
F : Textfile;
str : String;
Begin
AssignFile(F, FileName); {½«ÎļþÃûÓë±äÁ¿ F ¹ØÁª}
Reset(F); {´ò¿ª²¢¶ÁÈ¡Îļþ F }
Readln(F, str);
ShowMessage('ÎļþÓÐ:' +str + 'ÐС£');
Closefile(F); {¹Ø±ÕÎļþ F}
End;
Procedure AppendTxt(Str:String;FileName:String);
Var
F:Textfile;
Begin
AssignFile(F, FileName);
Append(F);
Writeln(F, Str);
Closefile(F);
End;


Ïà¹ØÎĵµ£º

ǶÈëʽGUI FTK½éÉÜ(3) XML½çÃæÃèÊöÓïÑÔ


ǶÈëʽGUI FTK½éÉÜ(3)-XML½çÃæÃèÊöÓïÑÔ
תÔØʱÇë×¢Ã÷³ö´¦ºÍ×÷ÕßÁªÏµ·½Ê½
ÎÄÕ³ö´¦£ºhttp://www.limodev.cn/blog
×÷ÕßÁªÏµ·½Ê½£ºÀîÏȾ² <xianjimli at hotmail dot com>
ÓÃXMLÀ´ÃèÊö½çÃ棬C/C++дÄÚ²¿Âß¼­£¬Óýű¾ÓïÑÔÀ´½ººÏ½çÃæºÍÄÚ²¿Âß¼­¡£FTKÕýÊÇ»ùÓÚÕâÖÖ˼ÏëÀ´Éè¼ÆµÄ£¬ËùÒÔËü×ÔÈ»»áÌṩ XML½çÃæÃèÊö¹¦ÄÜ£¬ÔÚ ......

php½âÎöxmlʾÀý

<!-- xml ¸ñʽ
<books>
<book id='1001'>
<author>andylin</author>
<title>c language</title>
<publisher id="aaa">O'Reilly</publisher>
</book>

<book id='1002'>
<author>congfeng</author>
<t ......

DelphiºÍC++Êý¾ÝÀàÐͶÔÕÕ±í

DelphiºÍC++Êý¾ÝÀàÐͶÔÕÕ±í
Delphi        ×Ö³¤/ÖµÓò                                C++
ShortInt  &n ......

C#ÖжÔXML½Úµã½øÐÐÔöɾ¸Ä²é

ºÅ³ÆxmlhelperµÄÒ»¸öÀà
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml;
namespace WebApplication2
{
/// <summary>
/// XMLHelper XMLÎĵµ²Ù×÷¹ÜÀíÆ÷
/// </summary>
public class XMLHelper
{
public X ......

´¦ÀíXMLµÄз½Ê½——LINQ to XML

ºÎνLINQ? LINQ¼´.NET ÓïÑÔ¼¯³É²éѯ(.NET Language-Integrated Query (LINQ) Framework),Ϊ.NET¼Ü¹¹ÖеÄÖØÒª×é³É²¿·Ö¡£LINQϵÁм¼ÊõÌṩÁËÕë¶Ô¶ÔÏó(LINQ)¡¢¹ØϵÊý¾Ý¿â(LINQ to SQL)ºÍXML(LINQ to XML)µÄÒ»ÖÂÐÔ²éѯÌåÑé¡£ ʲôÊÇLINQ to XML? LINQ to XML ʹÓÃ×îеÄ.NET FrameworkÓïÑÔ¹¦ÄÜ£¬Ï൱ÓÚ¸üкÍÖØÐÂÉè¼ÆµÄÎĵµ¶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ