????? ??? ???????? ?? ??????? XML ?????? ?????? ????? ????? ???? ??????? (DOM)

?????? ????????? ?????? ?????????
???? ???????: 286817 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

??????

????? ??? ??????? ????????? ????? ????????? ?????? Visual Basic ???? ???? ????? ???????? ?? MSXML ???? ???? ??????? (DOM) ???? ???????? ??????? ?? ??????? XML ??????? ?????.

??????? ????

??? ???????? ??????? ?? ??????? XML ?? ???? ??????? ?? ????? XML ???? ??? ??????? ?????. ??? ?????? ?? ????? ?? ??? ??????? ???? ?????? ????? ???? ????? ?? ???? ?? ??????? XML. ?? ???? ????? ????? ???? ?? MSXML ?? ??? ????? ??? ??? ????? ??????? ?????? ???? ????? (GUID) ?? ProgIDs ???? ??????? ????? ????? ???????? ????????. ??? ???? ??????? ???? ????? MSXML ??????? 4.0 ??? ?? ??? ????? ??? ???. ?????? ??? ??????? ?????? ??? ????????? ????????? ???????? ???? ???????? ?????? ????? ???????? ???????? ?? ???? MSXML 4.0 ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
305019INFO: MSXML 4.0 GUIDs ????? ? ProgIds
  1. ??? ??? ?? ???? ?? Microsoft Notepad.
  2. ??? ? ??? ??????? XML ???????? ??????? ?? ??????? ?? ?? ???? ????? ?? xmlbooks1.xml:
    <?xml version="1.0"?>
    <Books>
       <Book>
          <Title>XML Step By Step</Title>
          <Publisher>MS Press</Publisher>
       </Book>
       <Book>
          <Title>Developing XML Solutions</Title>
          <Publisher>MS Press</Publisher>
       </Book>
    </Books>
    					
  3. ??? ??? ??? ???? ?? "???????".
  4. ??? ? ??? ??????? XML ???????? ??????? ?? ??????? ?? ?? ???? ????? ?? xmlbooks2.xml:
    <?xml version="1.0"?>
    <Books>
       <Book>
          <Title>Beginning XML</Title>
          <Publisher>Wrox</Publisher>
       </Book>
       <Book>
          <Title>Professional XML</Title>
          <Publisher>Wrox</Publisher>
       </Book>
    </Books>
    					
  5. ???? ????? EXE ????? ???? ?? Visual Basic 6.0. ??? ????? Form1 ???? ???????.
  6. ?? ??????? ??????? ????? ???? ????? ??? XML Microsoft ? v3.0 ?? ????.
  7. ??? ?? ??? ??? Form1. ??? ????? Command1 ???? ???????.
  8. ??? ???? ???????? ???????? ??????? ??? ????? ????? Click CommandButton:
    ' In the ProgIDs below, change 30 to reflect the installed version of the Microsoft XML Parser.
    ' For example, use Dim doc1 As MSXML2.DOMDocument40 for MSXML 4.
    
    Dim doc1 As MSXML2.DOMDocument30
    Dim doc2 As MSXML2.DOMDocument30
    Dim doc2Node As MSXML2.IXMLDOMNode
    
    Set doc1 = New MSXML2.DOMDocument30
    Set doc2 = New MSXML2.DOMDocument30
    
    doc1.Load "d:\xmlbooks1.xml"
    doc2.Load "d:\xmlbooks2.xml"
    
    For Each doc2Node In doc2.documentElement.childNodes
      doc1.documentElement.appendChild doc2Node
    Next
    
    MsgBox doc1.xml
    
    doc1.save "d:\AllXMLBooks.xml"
    					
  9. ????? ????????? ???????? ?????? ????? ?? ??????? XML ???? ?? ??????? ?? ??????? ?? 1 ??? 4 ?? ?????? DOMDocument MSXML. ???????? ???????? ?? ??? ???????? ?? xmlbooks2.xml ?? ???? ?????? DOMDocument ???? ????? ??? ???????? ?? xmlbooks1.xml. ????? ??? ?????? ????? ??????? ??? ????? ??????? ?? ???? ??????? ?????? DOMDocument doc2 ????? ??? ???? ??? ?????? ??????? doc1 DOMDocument. ???????? XML ??????? ???????? ?? ???? ????? ???? ??????? ??? ??? ??? ?????.
  10. ??? AllXMLBooks.xml ?? Microsoft Internet Explorer ???? ????? XML ??????? ????? XML ??????:
    <?xml version="1.0"?>
    <Books>
    	<Book>
    		<Title>XML Step By Step</Title>
    		<Publisher>MS Press</Publisher>
    	</Book>
    	<Book>
    		<Title>Developing XML Solutions</Title>
    		<Publisher>MS Press</Publisher>
    	</Book>
    	<Book>
    		<Title>Beginning XML</Title>
    		<Publisher>Wrox</Publisher>
    	</Book>
    	<Book>
    		<Title>Professional XML</Title>
    		<Publisher>Wrox</Publisher>
    	</Book>
    </Books>
    					

???????

???? ???????: 286817 - ????? ??? ??????: 13/????? ??????/1425 - ??????: 3.2
????? ???
  • Microsoft XML Parser 2.0
  • Microsoft XML Parser 2.5
  • Microsoft XML Parser 2.6
  • Microsoft XML Parser 3.0
  • Microsoft XML Core Services 4.0
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Visual Basic 6.0 Enterprise Edition Service Pack 3
  • Microsoft Visual Basic 6.0 Enterprise Edition Service Pack 4
  • Microsoft Visual Basic 6.0 Professional Edition
????? ??????: 
kbmt kbhowto KB286817 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????286817

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com