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”
- 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.
- If you face difficulty generating the sample xml data and encounter error regarding namespace, resolve xsd namespace error by following these steps.