My hope was that this is possible. I would have prefered to have everything
inside the schema file, to see exactly which values are possible and what
happens if a value is outside a defined range.
For a user of this schema it's not possible to guess what happens inside my
program, if some wrong value is delivered.
But nevertheless thanks for your reply, it prevents me from a time consuming
search on the web.
Cheers Uwe
"Oleg Tkachenko" <oleg@NO!SPAM!PLEASEtkachenko.com> schrieb im Newsbeitrag
news:et**************@TK2MSFTNGP12.phx.gbl...
Uwe Kuhne wrote:
I receive a XML file from a customer and want to use a schema for
validating the XML file. What I don't know how to do is, that I want to continue
processing this XML - file no matter if there is an error or not.
e.g. I have an element <Code> which can contain values 1 to 9.
If something else is delivered within the XML file, I want to replace
this wrong value with the default 1.
Is this possible within the schema definition, or do I have to treat
this in my program.
Validation against schema can tell you whether XML is valid or not.
Basing on that you can "fix" your XML in your code.
--
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog