469,926 Members | 1,791 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,926 developers. It's quick & easy.

choice Element and GetXML method of DataSet

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?.

Thanks.
Apr 27 '06 #1
2 1131
What version of the framework are you using?

Thanks,
Zafar

"Ganesh Muthuvelu" <Ga*************@discussions.microsoft.com> wrote in
message news:F0**********************************@microsof t.com...
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?.

Thanks.

May 11 '06 #2
Version 1.1

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

Thanks,
Ganesh

"Zafar Abbas" wrote:
What version of the framework are you using?

Thanks,
Zafar

"Ganesh Muthuvelu" <Ga*************@discussions.microsoft.com> wrote in
message news:F0**********************************@microsof t.com...
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?.

Thanks.


May 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by em | last post: by
4 posts views Thread by Chris | last post: by
2 posts views Thread by Rajesh AVRS | last post: by
3 posts views Thread by Mark | last post: by
1 post views Thread by lucky | last post: by
1 post views Thread by lucky | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.