Generate sample XML data from XSD using Visual Studio

By | May 18, 2018 | 1 Comment
Category: Xml Tags: ,

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.

About Vishal Monpara

Vishal Monpara is a full stack Solution Developer/Architect with 13 years of experience primarily using Microsoft stack. He is currently working in Retail industry and moving 1's and 0's from geographically dispersed hard disks to geographically dispersed user leveraging geographically dispersed team members.

One thought on “Generate sample XML data from XSD using Visual Studio

Leave a Reply

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