ÓÃmsxml±£´æxmlÎļþ£¬ÎªÊ²Ã´»áÉÙÍ·²¿µÄ¼¸¸ö×Ö·û
ÔÀ´ÊÇ <?xml ....?> ±£´æºó±ä³ÉÁË ml...?> ¸ñʽÊÇUTF-8
±ðÈËÓÃmsxml¶¼Ã»ÓÐÉÙ£¬¾ÍÄãµÄÉÙÁË£¬Äã˵ÊÇΪʲô Óà ie ÄÜÕý³£´ò¿ªÂð£¿ÄܾÍûÊÂÁË ÄѵÀÎÒÕâ¾ÍÊÇ´«ËµÖеÄÈËÆ·ÎÊÌ⣿ ¸÷λÀÏ´ó°ï°ïæ°¡ Õ¦¸ö°ï棿×ÜÒª¸øµãÌáʾÂï¡£¡£¡£ ÄãÓÃʲôÈí¼þ²é¿´µÄ£¿ÒýÓà ÔÀ´ÊÇ <?xml ....?> ±£´æºó±ä³ÉÁË ml...?> ¸ñʽÊÇUTF-8 ÄãÕ¦±£´æÎļþµÄ£¿£¿£¿ ÈËÆ·ÎÊÌâ¡£¡£¡£¡£ MSXML2::IXMLDOMDocumentPtr pDoc; //´´½¨DOMDocument¶ÔÏó HRESULT hr = pDoc.CreateInstance(__uuidof(MSXML2::DOMDocument40)); if(!SUCCEEDED(hr)) { // AfxMessageBox(_T("ÎÞ·¨´´½¨DOMDocument¶ÔÏó£¬Çë¼ì²éÊÇ·ñ°²×°ÁËMS XML Parser ÔËÐпâ!")); return FALSE; } ... ... ... pDoc->save(bstrFileName); ÎÒ¾ÍÊÇÕâÑù±£´æµÄ£¬Ææ¹ÖµÄÊÇ£¬½ñÌì¾ÓÈ»ºÃÁË£¬¿´À´ÕæÊÇÈËÆ·ÎÊÌâ
Ïà¹ØÎÊ´ð£º
Êý¾Ý¿â±íÖÐÓÐÒ»ÁУ¨TranXml£©ÀàÐÍÊÇxml£¬´æ´¢µÄÊÇÀàËÆ <fathernode> <a>aaa </a> <b>bbb </b> </fathernode> µÄÐÅÏ¢£¬²¢ÇÒͨ¹ý²éѯ·½· ......
Private Sub Command1_Click() Dim MyString() As String Open "a.xml" For Binary As #1 ' ´ò¿ª¸Õ´´½¨µÄÎļþ¡£ ReDim MyString(LOF(1) - 1) Put #1, , MyRecord ' ¶ÁÈëËùÓÐ×Ö·ûµ½±äÁ¿ÖÐ ......
ÎÒÏÖÔÚÐèÒªÓÃschemaÀ´ÑéÖ¤Ò»¸öXMLÎļþ£¬µ«ÊÇÈ´·ÖÁ˼¸¸öXSDÎļþ£¬ÆäÖÐÓÐÒ»¸öÖ÷XSDÎļþ£¬ÓÃ#Include°üº¬ÁËÆäËûµÄXSDÎļþ¡£ÎÒÔÚXMLÎļþÖÐÖ®ÒýÓÃÖ÷XSDÎļþ£¬µ«ÊDz»³É¹¦£¬ÇëÎÊÎÒÊDz»ÊÇҪȫ²¿ÒýÓ㬻¹ÊÇÆäËûÎÊÌ⣿Èç¹ûÈ«²¿ ......
ÏÖÔÚÎÒдÁË´æ´¢¹ý³Ì£¬°Ñ±íÀïÃæµÄÊý¾Ýµ¼³öµ½xmlÖУ¬ÏÖÔڵĸñʽÊÇ£º <?xml version="1.0" encoding="GBK" ?> <PEOPLE> <PERSON PERSONID="1"> &l ......
ÈçºÎÓÃATL´°ÌåÓ¦ÓóÌÐòÖÐÓÃSystem.Xml±éÀúÒ»¸öXmlÎļþ Äã˵µÄÊÇÍйܴúÂ룿 ¡£ vc¿ÉÓÃmsxml http://msdn.microsoft.com/en-us/library/ms767594(VS.85).aspx MSXML4 //ÒýÈëmsxml4.dll &nbs ......