By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,083 Members | 1,608 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,083 IT Pros & Developers. It's quick & easy.

xml string - validation with typed dataset

P: n/a
Hi

I have the following method:

public string FindNameList (string XmlStore)
I have a dataset based on xml schema. I have created the schema in vs editor
and created the dataset based on the schema.
When The 'FindNameList' method gets called it needs to take the input string
and construct the dataset.
The questions I have:
1) How do I load the string xml into the dataset
2) How do I get notified if there are some errors with the input xml - where
is the validation happens?
Please reply specifically for this scenario.
I am using .Net with c#
Thanks
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
R.A.,

To load a string into the data set, you can use the ReadXml method on
the DataSet. You would pass in a StringReader instance, which is
initialized with the XML string.

If there is an error parsing the XML, I imagine the data set would throw
an exception, so you would want to catch it if this happens.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"R.A." <te**@hotmail.com> wrote in message
news:O1**************@TK2MSFTNGP15.phx.gbl...
Hi

I have the following method:

public string FindNameList (string XmlStore)
I have a dataset based on xml schema. I have created the schema in vs
editor
and created the dataset based on the schema.
When The 'FindNameList' method gets called it needs to take the input
string
and construct the dataset.
The questions I have:
1) How do I load the string xml into the dataset
2) How do I get notified if there are some errors with the input xml -
where
is the validation happens?
Please reply specifically for this scenario.
I am using .Net with c#
Thanks

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.