xsd - How to validate an XML file with a schema in memory with .NET? -


Rather than using a physical file, using XSD loaded from embedded application resources over runtime It is possible

You XmlSchemaCollection.Add (string, XmlReader) :

  string file = "assembly.Namespace.FileName.ext"; XmlSchemaCollectionxsc = New XmlSchemaCollection (); Xsc.Add (empty, new XmlTextReader (this.GetType (). Assembly.GetManifestResourceStream (file)));  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -