Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inline XSD
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Miscellaneous
Thread ID:
00736764
Message ID:
00737032
Views:
22
In VFP8, you will be able to use the XMLAdapter class and read in DataSets that contain more than one table. VFP8 will turn all the tables into different cursors. Very cool!!

>Right on the money! And it seems to work great with VFP7 XmlToCursor().
>
>Thanks.
>
>>Hi Bonnie and Stephane,
>>
>>Sorry for the mis-understanding about what you were looking for. Here is the solution I think you are wanting. This takes a DataSet and provides a string that contains the schema information as well as the data in xml format.
>>
>>
>>Dim sw As System.IO.StringWriter = New System.IO.StringWriter()
>>ds.WriteXml(sw, XmlWriteMode.WriteSchema)
>>Dim xmlString As String = sw.ToString()
>>
>>
>>>Hi Stephane,
>>>
>>>I saw your original question over on the VFP forum earlier today and I was trying to figure out exactly how to go about doing this. I didn't come up with anything elegant, so I gave up on it and decided not to reply to your question, since I didn't have a complete answer. But, I'm sure what you're looking for is the WriteXML() method.
>>>
>>>The DataSet.WriteXML() method has a means of writing an inline schema along with your data, and it has many overrides to write the XML in various formats (a file, a stream, etc) but unfortunately not a string (seems silly to me to have left this one out). I spent some time trying to figure out how to easily convert say, a stream, to a string but couldn't figure out how. I'm sorry I couldn't spend more time on trying to figure it out, but if you weren't already aware of the WriteXML() method, maybe this might point you in the right direction.
>>>
>>>Maybe Cathi will jump in here to save the day with sample code (as she usually does).
>>>
>>>~~Bonnie
>>>
>>>
>>>>Does anybody knows how to Create an inline XSD from a dataset. i can create the schema using DataSet.GetXmlSchema() and the XML with DataSet.GetXml() but how do i combine the two ?
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform