1

I need to generate sample xml from xsd for testing prupose and XMLSpy does the job nicely !

But I don't want to do it one by one, I want to be able to do it in batch as I have loads for XSD files also whenever I made some changes to those XSD files, I want to be able to easily generate xml from XSD files again.

Is there any API there for this job ? C++, C#, java, python I don't care as long as it works.

Or is there any easy way of doing it ?

BTW I know I can use xsd tool to generate c# class then write a few line of c# code to provide some data to generate xml, but this way I need to provide data for each XSD which I really don't want to ...

Thanks in advance.

RoundPi
  • 5,819
  • 7
  • 49
  • 75

1 Answers1

1

You can use the xsd2inst command from the open-source Java project XMLBeans

Usage is here.

Also check out this: How to generate sample XML documents from their DTD or XSD?

Community
  • 1
  • 1
lbalazscs
  • 17,474
  • 7
  • 42
  • 50