Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a XSD-driven random XML test data generator? [duplicate]

Tags:

java

c#

xml

xsd

delphi

For stress tests, I would like to create XML files based on a XSD with random (but valid!) test data. Is there a tool which can read a (simple) XSD file and build a XML file based on the schema definition?

like image 459
mjn Avatar asked Aug 27 '10 08:08

mjn


People also ask

Can we generate XML from XSD?

Just follow the below steps to get XML from XSD. Select XSD File in project, right click for Menu and select Generate > XML File… Provide the XML file Name and XML File location in the popup window. Click on next button.

Is XSD and XML the same?

XSD is based and written on XML. XSD defines elements and structures that can appear in the document, while XML does not. XSD ensures that the data is properly interpreted, while XML does not. An XSD document is validated as XML, but the opposite may not always be true.

Can we generate XML from XSD Python?

This is a simple python script to help you generate some xmls if you have a xsd. It uses the xmlschema library to parse the given schema document and then populate some hardcoded values.

How do I create an XSD from an XML file?

With the desired XML document opened in the active editor tab, choose Tools | XML Actions | Generate XSD Schema from XML File on the main menu. The Generate Schema From Instance Document dialog box opens. and select the desired file in the dialog that opens.


1 Answers

Many tools exist to do this, check theses links

  • Microsoft XmlSampleGenerator (free), you can download the source code and build with visual studio.
  • Liquid XML Sample Generator (Great tool)
  • XMLSpy from Altova (Expensive but complete)
  • XML Schema Editor from Oxygen
  • XML Schema Explorer, included with visual studio
  • XML Generator from Stylus studio
like image 97
RRUZ Avatar answered Oct 06 '22 00:10

RRUZ