Generate sample XML data from XSD using Visual Studio

Category: XmlTags: ,

If you have XSD file and you want to generate sample XML file to visualize xml data, here is a quick way generate sample XML data using Visual Studio.

  • Open Visual Studio 2008 or later.
  • Drag XSD file on Visual Studio or go to Visual Studio > File > Open > File and select the XSD file to open.
  • Click on “XML Schema Explorer”
    Visual Studio open XSD file
  • Within “XML Schema Explorer” scroll all the way down to find the root/data node. Right click on root/data node and it will show “Generate Sample XML”. If it does not show, it means you are not on the data element node but you are on any of the data definition node.
    Visual Studio XSD file Generate Sample XML Data
  • If you face difficulty generating the sample xml data and encounter error regarding namespace, resolve xsd namespace error by following these steps.

Share

1 comment

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

  1. Robert says:

    In MS VS 2008 there is no “XML Schema Explorer” …:(