Loading XML Data in Visual Basic
Visual Basic provides routines that make loading XML data trivial. Example program ReadXml, shown in Figure 7.7, loads XML data into a DataSet object. It then binds the DataSet to a DataGrid control so you can view the data. Use the File menu’s Open command to select an XML file.
Figure 7.7. Example program ReadXml loads XML files and displays their data.
Click on an underlined entry in the DataGrid to expand that object. If you click the PhoneNumber entry in Figure 7.7, the program displays the PhoneNumber records as shown in Figure 7.8. Click the white arrow pointing left in the DataGrid’s upper right corner ...