Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading XML and inserting into a table.

Status
Not open for further replies.

dymadarlin

Programmer
Jun 26, 2003
41
0
0
CA
I want to read a xml file from internet and put it into a table.

This is my code:


Dim xmlFilename As String = "
Dim fsReadXml As New System.IO.FileStream(xmlFilename, System.IO.FileMode.Open)

dim MyDataTable as New DataTable

MyDataTable.DataSet.ReadXml(fsReadXml)

And it produces the following error:

An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll

Additional information: URI formats are not supported.
 
See if it has the schema in the XML, if so, you may by able to use Dataset.readxmlschema. If not, you may have to read in the file via an XML Reader object, then build the dataset for it. Thanks to the wide variety of uses for XML, it's hard to have a standard format.

-Rick

----------------------

[monkey] I believe in killer coding ninja monkeys.[monkey]
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top