Re: XML validation with multiple schemas

Tech-Archive recommends: Speed Up your PC by fixing your registry



gxdata wrote:
I'm finding errors that I don't understand with the MSDN Library code at http://msdn2.microsoft.com/en-us/library/wc8csdkz.aspx (XML validation with multiple schemas), which relate to the dvd schema that's inline within the xml data file (mixed.xml) -

That example is for .NET 1.1 where you need to use XmlValidatingReader.
With .NET 2.0 and later you should use XmlReader with the proper XmlReaderSetttings <URL:http://msdn2.microsoft.com/en-us/library/system.xml.xmlreadersettings.aspx> and you need to set the validation flag to process inline schemas <URL:http://msdn2.microsoft.com/en-us/library/system.xml.schema.xmlschemavalidationflags.aspx> if you want to validate against inline schemas.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
.



Relevant Pages

  • Re: validation of an xml file against multiple defined schema
    ... i have this new problem when it comes to xml validation against ... if i change my xsd file, it will still display the content of the xml ... //Add the schemas to the XmlSchemaCollection object. ... my problem was on the second situation, one document conforms to ...
    (microsoft.public.dotnet.languages.csharp)
  • XML validation and namespace strangeness...
    ... I've been having a play with XML validation against schemas in C# and been ... I run the sample and the xml fails validation. ... I now change the namespace of the root node in the xml and run the sample ...
    (microsoft.public.dotnet.xml)
  • Re: Do you have to be online to validate XML against a W3C schema?
    ... The XML Editor in VS2005 ships a set of predefined schemas which are ... These schemas describe some of the core standard XML ... xsdschema.xsd - XSD for XSD ...
    (microsoft.public.dotnet.xml)
  • Re: Word 2003 automation from NT Service (.Net)
    ... > I have been investigating the use of XML Schemas with Word 2003 to ... > automatically generate data rich docs using XML data files, ... > Ultimately I will want to control this automation from an NT Service, ...
    (microsoft.public.office.developer.automation)
  • Re: Processing XSD Files
    ... It's a well-known XML editor with ... constrained by Schemas. ... > There are network databases and object databases and XML databases that ... > to point to records representing outer elements. ...
    (alt.comp.lang.borland-delphi)