2

I have a xsd file and I need to generate a xml file from it. What is the easiest way to achieve this?

EDIT: There is a similar question here and so i want to close my question. However if you have an answer please post it...

EDIT: One of the respondents deleted their answer, but i found it to be the simplest solution that works for me. It is here

Community
  • 1
  • 1
Developer
  • 17,809
  • 26
  • 66
  • 92
  • +1 for posting a link to the duplicate voluntarily! :-) – Cerebrus May 18 '09 at 17:28
  • That code (XmlSampleGenerator) is fairly old, and it pulls shenanigans like accessing private, undocumented fields via reflection. I got it to work on Mono by making a few tweaks, which I'll share if anyone's interested. – Matthew Flaschen May 18 '09 at 23:24
  • @MatthewFlaschen, can you please share your lessons learned while using XmlSampleGenerator? – gap Apr 11 '12 at 15:02

3 Answers3

1

It is here

Developer
  • 17,809
  • 26
  • 66
  • 92
0

Take a look at using XMLSpy. It's a great piece of software..

Alexander Kahoun
  • 2,458
  • 24
  • 36
0

Stylus Studio will do this for you by creating an XML with sample data.

File -> Document Wizards -> XML Schema to XML.

But did you want to do this programmatically ?

Cerebrus
  • 25,615
  • 8
  • 56
  • 70
  • Being able to do it programmtically in .NET would be very helpful, but for now i just need an xml file to test deserialization using the xsd. – Developer May 18 '09 at 17:27
  • Hmmm... I hope the info was useful. Stylus isn't free but has an evaluation version. Personally, I have used a few XML IDE's and found Oxygen XML to be the coolest. – Cerebrus May 18 '09 at 17:31