PC Review


Reply
Thread Tools Rate Thread

How to determinate a xml file vaildated by strong type dataset

 
 
ad
Guest
Posts: n/a
 
      12th Jun 2005
I use a strong type dataset(as ds below) to read a xml file.
How can I determinate if the xml file is validated according the xsd of the
strong type dataset?

**********************************************************
Health ds = new Health();
ds.ReadXml(sFileName);


 
Reply With Quote
 
 
 
 
Sahil Malik [MVP]
Guest
Posts: n/a
 
      12th Jun 2005
You have to use regular XML Schema validation, XmlValidatingReader
specifically to perform this job. In most cases the dataset itself will crib
if there are certain errors, but a dataset is a bit more forgiving than
XmlValidatingReader.


--

- Sahil Malik [MVP]
Upcoming ADO.NET 2.0 book - http://tinyurl.com/9bync
----------------------------------------------------------------------------


"ad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I use a strong type dataset(as ds below) to read a xml file.
> How can I determinate if the xml file is validated according the xsd of
> the
> strong type dataset?
>
> **********************************************************
> Health ds = new Health();
> ds.ReadXml(sFileName);
>
>



 
Reply With Quote
 
ad
Guest
Posts: n/a
 
      12th Jun 2005
How can I do?
Can you give me a example?


"Sahil Malik [MVP]" <(E-Mail Removed)> 撰寫於郵件新聞
:#(E-Mail Removed)...
> You have to use regular XML Schema validation, XmlValidatingReader
> specifically to perform this job. In most cases the dataset itself will

crib
> if there are certain errors, but a dataset is a bit more forgiving than
> XmlValidatingReader.
>
>
> --
>
> - Sahil Malik [MVP]
> Upcoming ADO.NET 2.0 book - http://tinyurl.com/9bync
> --------------------------------------------------------------------------

--
>
>
> "ad" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I use a strong type dataset(as ds below) to read a xml file.
> > How can I determinate if the xml file is validated according the xsd of
> > the
> > strong type dataset?
> >
> > **********************************************************
> > Health ds = new Health();
> > ds.ReadXml(sFileName);
> >
> >

>
>



 
Reply With Quote
 
Sahil Malik [MVP]
Guest
Posts: n/a
 
      13th Jun 2005
There is code on the help page of MSDN for XmlValidatingReader, or I just
googled for XmlValidatingReader which showed up the first google hit that
says "XmlValidatingReader Sample Code" at
http://weblogs.asp.net/dbrowning/articles/114561.aspx

- Sahil Malik [MVP]
Upcoming ADO.NET 2.0 book - http://tinyurl.com/9bync
----------------------------------------------------------------------------

"ad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How can I do?
> Can you give me a example?
>
>
> "Sahil Malik [MVP]" <(E-Mail Removed)> 撰寫於郵件新聞
> :#(E-Mail Removed)...
>> You have to use regular XML Schema validation, XmlValidatingReader
>> specifically to perform this job. In most cases the dataset itself will

> crib
>> if there are certain errors, but a dataset is a bit more forgiving than
>> XmlValidatingReader.
>>
>>
>> --
>>
>> - Sahil Malik [MVP]
>> Upcoming ADO.NET 2.0 book - http://tinyurl.com/9bync
>> --------------------------------------------------------------------------

> --
>>
>>
>> "ad" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> >I use a strong type dataset(as ds below) to read a xml file.
>> > How can I determinate if the xml file is validated according the xsd of
>> > the
>> > strong type dataset?
>> >
>> > **********************************************************
>> > Health ds = new Health();
>> > ds.ReadXml(sFileName);
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing an XML file through strong typed dataset Robert Bravery Microsoft C# .NET 3 21st May 2007 06:50 PM
How to determinate the data type ad Microsoft ADO .NET 4 5th Dec 2006 08:39 PM
I determinate the data type of a physical table field ad Microsoft C# .NET 1 5th Dec 2006 06:54 PM
Strong Typed Dataset best practices Fernando Chilvarguer Microsoft ADO .NET 2 25th Aug 2006 06:28 PM
C# .Net V2, Strong Type Dataset returning more than one row. paul.phillips@MXL.com Microsoft C# .NET 3 13th Sep 2005 07:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:43 PM.