Wednesday, March 28, 2012

Valida an XML file

I'd like to validate an xml file against an Schema and 3 tables (As lookups)
online from my database. I am thinkning to return an structure like a
dataset from a webserivce and then try to load the xml into the dataset
offline and show the user the errors? Dose this appraoch work?
Thanks a lotThe XmlValidatingReader can be used for this purpose, provided you have an
XSD to run against. Another validation option is running the XML through and
XSL doc.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"J-T" wrote:
> I'd like to validate an xml file against an Schema and 3 tables (As lookups)
> online from my database. I am thinkning to return an structure like a
> dataset from a webserivce and then try to load the xml into the dataset
> offline and show the user the errors? Dose this appraoch work?
>
> Thanks a lot
>
>
But where should I keep the data of my lookup tables? That's why I was
thinking of a container like dataset.
Thanks
"Cowboy (Gregory A. Beamer) - MVP" <NoSpamMgbworld@.comcast.netNoSpamM> wrote
in message news:286533D1-EF64-4A20-8F55-FA5709DF92B4@.microsoft.com...
> The XmlValidatingReader can be used for this purpose, provided you have an
> XSD to run against. Another validation option is running the XML through
> and
> XSL doc.
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
> ***************************
> Think Outside the Box!
> ***************************
>
> "J-T" wrote:
>> I'd like to validate an xml file against an Schema and 3 tables (As
>> lookups)
>> online from my database. I am thinkning to return an structure like a
>> dataset from a webserivce and then try to load the xml into the dataset
>> offline and show the user the errors? Dose this appraoch work?
>>
>> Thanks a lot
>>
JT.
At first sight, "Why not?, however don't forget to write the schema.
\\\
ds.WriteXml("path",XmlWriteMode.WriteSchema)
///
I hope this helps.
Cor
So you mean that I can get whatever I want from the webserivce and dump it
into the client machines(Schema + Data) and from then onwrads the client can
work offline and also to be able to connect from while to while and get the
latest schema and data,right?
Thanks
"Cor Ligthert [MVP]" <notmyfirstname@.planet.nl> wrote in message
news:esXfEN9nFHA.764@.TK2MSFTNGP14.phx.gbl...
> JT.
> At first sight, "Why not?, however don't forget to write the schema.
> \\\
> ds.WriteXml("path",XmlWriteMode.WriteSchema)
> ///
> I hope this helps.
> Cor
>

No comments:

Post a Comment