T
Tae Lee
Could someone please help me? I have searched everywhere
but couldn't find definite answers. I am trying to read
xml file to a dataset and select from it. Here's xml
file:
<?xml version="1.0" encoding="utf-8" ?>
<root>
<data>
<id>1</id>
<name>Tae Lee</name>
</data>
<data>
<id>2</id>
<name>Tae Sung Lee</name>
</data>
</root>
Then here's the code.
Dim ds As New Data.DataSet
ds.ReadXml("data.xml")
Dim dt As DataTable = ds.Tables("data")
Dim str As String = "id = 2"
Dim dr As Data.DataRow = dt.Select(str)
Literal1.Text = dr.Item(1)
The problem is that when you select from datatable, the
result is 1-dimensional array of data row. So I get an
error when I attempt to put array into a row. If you
have any similar experience, please let me know. Thank
you so much.
-Tae Lee
but couldn't find definite answers. I am trying to read
xml file to a dataset and select from it. Here's xml
file:
<?xml version="1.0" encoding="utf-8" ?>
<root>
<data>
<id>1</id>
<name>Tae Lee</name>
</data>
<data>
<id>2</id>
<name>Tae Sung Lee</name>
</data>
</root>
Then here's the code.
Dim ds As New Data.DataSet
ds.ReadXml("data.xml")
Dim dt As DataTable = ds.Tables("data")
Dim str As String = "id = 2"
Dim dr As Data.DataRow = dt.Select(str)
Literal1.Text = dr.Item(1)
The problem is that when you select from datatable, the
result is 1-dimensional array of data row. So I get an
error when I attempt to put array into a row. If you
have any similar experience, please let me know. Thank
you so much.
-Tae Lee