all groups > dotnet xml > april 2006 >
You're in the

dotnet xml

group:

choice Element and GetXML method of DataSet


choice Element and GetXML method of DataSet Ganesh Muthuvelu
4/27/2006 4:15:01 PM
dotnet xml: Hello,
I have a schema that contains two "choice" elements, say "F1" and "F2" -
meaning either F1 or F2 can be present but not both.
I loaded this schema into a dataset, which created two columns in the
datatable "F1" and "F2". Now, I load the dataset with a value for F1 and not
for F2.
When I use the GetXML method of the dataset, the output produces both
elements F1 and F2, like shown below:

<F1>value1</F1>
<F2 />

which according to the schema is not right bcos only one element F1 or F2
has to be present and not both..

Any ideas on how the overcome this GetXML method behavior?.

Re: choice Element and GetXML method of DataSet Zafar Abbas
5/11/2006 10:44:48 AM
What version of the framework are you using?

Thanks,
Zafar

"Ganesh Muthuvelu" <GaneshMuthuvelu@discussions.microsoft.com> wrote in
message news:F0E3600A-8B21-4BBE-8B5E-C9CEC9F161CC@microsoft.com...
[quoted text, click to view]

Re: choice Element and GetXML method of DataSet Ganesh Muthuvelu
5/11/2006 10:53:02 AM
Version 1.1

If framework 2.0 provides a method for this, I have no issues in using 2.0.

Thanks,
Ganesh

[quoted text, click to view]
AddThis Social Bookmark Button