I am trying to read the following xml file into my datagridview
<?xml version="1.0" encoding="utf-8" ?>
<DEFLECTIONS_TABLE>
<Deflections number="1">
<Service_Class>A</Service_Class>
<Verticle>600</Verticle>
<Horizontal>400</Horizontal>
<Service_Class>B</Service_Class>
<Verticle>600</Verticle>
<Horizontal>400</Horizontal>
<Service_Class>C</Service_Class>
<Verticle>600</Verticle>
<Horizontal>400</Horizontal>
<Service_Class>D</Service_Class>
<Verticle>800</Verticle>
<Horizontal>400</Horizontal>
<Service_Class>E</Service_Class>
<Verticle>1000</Verticle>
<Horizontal>400</Horizontal>
<Service_Class>F</Service_Class>
<Verticle>1000</Verticle>
<Horizontal>400</Horizontal>
</Deflections>
</DEFLECTIONS_TABLE>
I made my windowsform and put a datagridview inside called deflection_datagrid.
Dim filepath As String = "C:\NPF\NBS Design\Crane Beam\Main\Crane Design V1\Crane Design V 1.0\XMLFile1.xml"
Dim deflection_dataset As New DataSet
Try
deflection_dataset.ReadXml(filepath)
Deflections_datagrid.DataSource = deflection_dataset
Deflections_datagrid.DataMember = "Deflections"
Catch
MessageBox.Show(Err.Description)
End Try
I've tried to use this coding, but it will not load into the datagridview nor does it give me any error.
Any suggestions?????
Thanks