简体   繁体   中英

Batch generating sample xml for loads for XSD files

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.

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM