I don't know of any automatic option, but if you control the schema then you
need to make sure that all elements that were previously only defined tp be
nested elements are also valid as top-level elements. If you're using the
DataSet to generate the XML in the first place, can you extract some
"reference data" and extract the Schema you validate against from the
DataSet and then add the necessary top-level elements?
--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor
"Anders Nilsson" <an************@datainnovatoren.com> wrote in message
news:01****************************@phx.gbl...
I'd like to know if there is support in .NET to
somehow "flatten" a nested XML schema.
Here is the situation:
Currently I have code that can validate nested XML
against a schema. The XML is generated by using a DataSet.
Now I want to generate the XML as non-nested from the
DataSet by setting the flag Nested to false in the
Relation objects but still be able to validate it using
the same "nested" schema. So I'm hoping there is a way to
do a similar trick with a schema, load it and set som
nested flag to false and then be able to use it for
validation.