ZekeLA
asked on
How to user Dataset ReadXMLSchema from XML String without XSD File
I have dataset which I used its GetXMLSchema and GetXML methods on. With those string values, how can I load a new dataset with the xml and its schema?
Here's my code so far:
I think I need to convert sXMLSchema to some type of reader but I haven't been able to figure that part out yet. And I don't really want to have to save the schema to an XSD file just to use the ReadXmlSchema(FileName) overload.
Any suggestions on how to do this?
Thanks in advance.
Here's my code so far:
Dim sXMLSchema As String = SomeDataSet.GetXMLSchema()
Dim sXML As String = SomeDataSet.GetXML()
Dim ds As New DataSet
' ds.ReadXmlSchema( ??? ) ' What goes here?
ds.ReadXml(readerXML)
I think I need to convert sXMLSchema to some type of reader but I haven't been able to figure that part out yet. And I don't really want to have to save the schema to an XSD file just to use the ReadXmlSchema(FileName) overload.
Any suggestions on how to do this?
Thanks in advance.
ASKER
Is there any way to do it without creating a file first?
I'm starting with a dataset. I want to pass that dataset using xml through a webservice. The client is not necessarily .NET so I can't / don't want to pass the dataset directly.
Thanks.
I'm starting with a dataset. I want to pass that dataset using xml through a webservice. The client is not necessarily .NET so I can't / don't want to pass the dataset directly.
Thanks.
ASKER
A developer friend of mine gave me the solution. I'll post it if it's not proprietary.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window