Knowledge.ToString() issue while importing XSD

If you are trying to work with XSD you may encounter following errors

  • Namespace ‘’ is not available to be referenced in this schema.
  • Imported schema for namespace ‘’ was not resolved.

This error means that either you need to declare the namespace “” within XSD or the xml.xsd file in which this namespace is declared is not available.

If you need to declare the namespace, add the following line within xsd as a first child within <xsd:schema> tag

<xsd:import namespace="" schemaLocation="xml.xsd" />

Also the folder in which you have your xsd file, you need to have “xml.xsd” file available. This file is a generic file regardless of the structure of your xml data.

Download xml.xsd file

This download contains zip file. Extract xml.xsd out of it and place it in the same directory which has your own xsd file.

Note: xml.xsd from zip is exactly same as what is available at This download is available for added convenience just in case you forget to copy source code of this xsd and instead if you copy what is visible on the browser.



One response to “ issue while importing XSD”

  1. Generate Sample XML Data From XSD Using Visual Studio | Vishal Monpara

    […] If you face difficulty generating the sample XML data and encounter error regarding namespace, resolve xsd namespace error by following these steps. […]

Leave a Reply

Your email address will not be published. Required fields are marked *