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

PHP¶ÁÈ¡XMLÎÊÌâ


PHP code:



$doc=new DOMDocument("1.0","utf-8"); #ÉùÃ÷ÎĵµÀàÐÍ
$doc->formatOutput=true; #ÉèÖÿÉÒÔÊä³ö²Ù×÷

#ÉùÃ÷¸ù½Úµã£¬×îºÃÒ»¸öXMLÎļþÓиö¸ú½Úµã
$root=$doc->createElement("root"); #´´½¨½Úµã¶ÔÏóʵÌå
$root=$doc->appendChild($root); #°Ñ½ÚµãÌí¼Ó½øÀ´

# for($i=1;$i<100;$i++){ //Ñ­»·Éú³É½Úµã£¬Èç¹ûÊý¾Ý¿âµ÷ÓóöÀ´¾Í¸ÄÕâÀï

$info=$doc->createElement("info"); #´´½¨½Úµã¶ÔÏóʵÌå
$info=$root->appendChild($info); #°Ñ½ÚµãÌí¼Óµ½root½ÚµãµÄ×Ó½Úµã

$name_value=$doc->createAttribute("value"); #´´½¨½ÚµãÊôÐÔ¶ÔÏóʵÌå
$name_value=$info->appendChild($name_value); #°ÑÊôÐÔÌí¼Óµ½½ÚµãinfoÖÐ

$name=$doc->createElement("name"); #´´½¨½Úµã¶ÔÏóʵÌå
$name=$info->appendChild($name);

$sex=$doc->createElement("sex");
$sex=$info->appendChild($sex);

$name->appendChild($doc->createTextNode("MUSIC")); #createTextNode´´½¨ÄÚÈݵÄ×ӽڵ㣬Ȼºó°ÑÄÚÈÝÌí¼Óµ½½ÚµãÖÐÀ´
$name_value->appendChild($doc->createTextNode("ÕÅÈý"));
$sex->appendChild($doc->createTextNode("ÄÐ")); #×¢ÒâҪתÂë¶ÔÓÚÖÐÎÄ£¬ÒòΪXMLĬÈÏΪUTF-8¸ñʽ # }

$name->appendChil


Ïà¹ØÎÊ´ð£º

³ÏÕÐÓо­ÑéµÄPHP¹¤³Ìʦ£¨¿É¼æÖ°) - PHP / »ù´¡±à³Ì

1.¾«Í¨ÃæÏò¶ÔÏóµÄÉè¼ÆºÍ¿ª·¢£»
2.ÊìÁ·Ê¹ÓÃPHPÓïÑÔ(5.0+)½øÐÐÊý¾Ý¿â£¬ÍøÂçͨÐÅ£¬Îļþ¶Áд£¬°²È«»úÖÆµÈ¿ª·¢£»
3.ÊìÁ·Ê¹ÓÃMYSQL(5.0+)Êý¾Ý¿â¿ª·¢£¬°üÀ¨»ù±¾µÄÊý¾Ý¿âÉè¼Æ/ÓÅ»¯/°²È«£¬¸´ÔÓµÄT-SQLÓï¾ä±àд£¬ÊìÁ·±àдMYS ......

java xmlÎÄÌâ - Java / Java SE

<?xml version="1.0" encoding="utf-8" ?> 
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical&q ......

vb¶ÁÈ¡ÓÃwordת»»³ÉµÄxmlÀïµÄÊý¾Ý - VB / »ù´¡Àà

Private Sub Command1_Click()
Dim MyString() As String
Open "a.xml" For Binary As #1 ' ´ò¿ª¸Õ´´½¨µÄÎļþ¡£
ReDim MyString(LOF(1) - 1)
  Put #1, , MyRecord ' ¶ÁÈëËùÓÐ×Ö·ûµ½±äÁ¿ÖÐ ......

±±¾©2ÄêPHP¾­ÑéÇó¼æÖ° - PHP / Framework

±±¾©2ÄêPHP¾­ÑéÇó¼æÖ°
½Ó·Ö

·¹ý½Ó·Ö£¡.¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£

jf~~~~~~~~~~~~~~Ö§³Ö

ßÀ¡£¡£ÎÒÃÇÐèÒª¼æÖ°£¬¿ÉÊÇÔõôÁªÏµÄãѽ£¿

¶¥¡£¡£¡£ »Ø¸´ÄÚÈÝ »Ø¸´ÄÚÈÝÌ«¶ÌÁË£¡

º¼ÖÝÄãÈ¥²»È¥°¡ ¡£¡£¡£¡£¡ ......

VCÖÐxml±éÀú - VC/MFC / ATL/ActiveX/COM

ÈçºÎÓÃATL´°ÌåÓ¦ÓóÌÐòÖÐÓÃSystem.Xml±éÀúÒ»¸öXmlÎļþ
Äã˵µÄÊÇÍйܴúÂ룿
¡£

vc¿ÉÓÃmsxml
http://msdn.microsoft.com/en-us/library/ms767594(VS.85).aspx

MSXML4  
  //ÒýÈëmsxml4.dll &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ