how to i load a dataset from a xml(url)?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i got this far

Sub getvin(ByVal sender As Object, ByVal e As System.EventArgs)

Dim item As DataGridItem = CarGrid.Items(CarGrid.EditItemIndex)
If (Not item Is Nothing) Then
Dim txtVin As TextBox = CType(item.FindControl("VinNumber"),
TextBox)
Dim Vin As String = txtVin.Text
Dim m_url As String
m_url =
"http://harnessone.dataonesoftware.c...?clientName=best-auto-network.com&vinNumbers="
& Vin &
"&bodyStyles=&accessCode=tiskhrtjwebsbgbjyvhezwzukvcctgvmgmxqcqzrvshnqbpenw"
Dim xmldoc As New System.Xml.XmlDocument

Try

xmldoc.Load(m_url)

Dim dstvim As DataSet
dstvim = New DataSet
?????????

Catch Ex As System.Xml.XmlException

RichTextBox1.Text = Ex.Message

End Try
End If

End Sub
 
I am having syntax problems

xmldoc.Load(m_url)

Dim dstvim As DataSet
dstvim = New DataSet
dstvim.ReadXml(???)
 
Stanley J Mroczek said:
I am having syntax problems

xmldoc.Load(m_url)

Dim dstvim As DataSet
dstvim = New DataSet
dstvim.ReadXml(???)

You need to read the documenation, -_-. It clearly lays out a set of
overloads.

You can load the xml from a stream, XmlReader, or as a file, but you cannot
load it from an XmlDocument.

Create an XmlTextReader instead and pass that to ReadXml
 
Ok I got xmldata from a URL. I have tried to read Microsoft quickstarts, but
still don’t know where to start. What I want is to create a dataset and read
the data from the URL.
What do I do first? Create DataSet mappings or XML Schema Definition
language (XSD) schema? Please tell me what to do first? What do you create
XSD schema from the URL?
 
Back
Top