Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting dataset to xml
Message
General information
Forum:
ASP.NET
Category:
XML
Miscellaneous
Thread ID:
01062521
Message ID:
01062537
Views:
11
Hi Holger,

To get schema information you need to load the dataset with schema info by using the DataAdapter.MissingSchemaAction property and setting to MissingSchemaAction.AddWithKey.

As to the output generated - if you're generating to string you'll get Unicode output because all .NET strings are Unicode - there's no such thing as a UTF-8 encoded string. If you need to pass UTF-8 encoded text back to whatever you can use Encoding.UTF8 to convert to bytes and pass that back instead.


+++ Rick --


>Hi,
>
>I'm trying to convert a dataset to XML string using C#.
>The string should be passed as a return value of a method.
>
>I've got 3 big problems with that.
>
>1. the dataset just gives me the XML and schema with seperate methods, but I want schema and XML in one string
>2. the XML is UTF16 encoded, but I want UTF8
>3. the schema doesn't include field length informations, with the result, that a VFP application which consumes the XML, creates Memofields for each character field
>
>Any ideas to solve these problems?
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform