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
Ïà¹ØÎÊ´ð£º
Êý¾Ý¿â±íÖÐÓÐÒ»ÁУ¨TranXml£©ÀàÐÍÊÇxml£¬´æ´¢µÄÊÇÀàËÆ
<fathernode>
<a>aaa
</a>
<b>bbb
</b>
</fathernode>
µÄÐÅÏ¢£¬²¢ÇÒͨ¹ý²éѯ·½· ......
DataSetµ¼³öxml Åú´¦Àí(Ñ»·)µÃÔõô´¦Àí
XMLÎļþ
<A>
<B>
<C>
</C>
&nb ......
ÎÒÔÚ±àдһ¸öwince5.0µÄ³ÌÐò£¬ÏëʵÏÖ°ÑPDAÉϵÄÒ»¸öLIST <STRING>ÀàÐ͵ÄÊý¾ÝÐòÁл¯ÎªXML£¬È»ºóÔÚPCÉϵÄÒ»¸öwebserviceÄõ½Õâ¸öXML£¬×ª»¯ÎªDataset£¬¸üÐÂPCÉϵÄÊý¾Ý¿â£¬ÎÒÏëÎÊÔõô°ÑXML´«¸øwebserviceµÄÄØ£¿
......
Private Sub Command1_Click()
Dim MyString() As String
Open "a.xml" For Binary As #1 ' ´ò¿ª¸Õ´´½¨µÄÎļþ¡£
ReDim MyString(LOF(1) - 1)
Put #1, , MyRecord ' ¶ÁÈëËùÓÐ×Ö·ûµ½±äÁ¿ÖÐ ......
ÈçºÎÓÃATL´°ÌåÓ¦ÓóÌÐòÖÐÓÃSystem.Xml±éÀúÒ»¸öXmlÎļþ
Äã˵µÄÊÇÍйܴúÂ룿
¡£
vc¿ÉÓÃmsxml
http://msdn.microsoft.com/en-us/library/ms767594(VS.85).aspx
MSXML4
//ÒýÈëmsxml4.dll &nbs ......