0

I have the following problem: I have some XSD's and I need to generate XML from it. I wonder what the best way to generate the xml's. I'm thinking of starting to generate the XSD classes with XSD.EXE, then instantiate classes and then I serialize the class to XML. Is there any way to instantiate the XSD, fill the necessary data and then generate XSD to XML?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
mcamara
  • 731
  • 4
  • 15
  • 26
  • Have you tried this? What was the result? What problems did you have? – John Saunders Nov 25 '11 at 14:01
  • 1
    This is a duplication of this question http://stackoverflow.com/questions/17106/how-to-generate-sample-xml-documents-from-their-dtd-or-xsd – tom redfern Nov 25 '11 at 14:05
  • Please describe what is it that you are trying to achieve with these sample XMLs, and where do you see the data to put in the XMLs, coming from; to help us understand what "best way" might be. Hugh seems to believe it is a duplicate, since he assumed what you want is already covered elsewhere. But what if the best way might be to have all the XML you need generated using data from an Excel spreadsheet (as I've seen it asked so many times); I would move to say then that your question is not a duplicate... – Petru Gardea Nov 25 '11 at 15:14
  • I've up-voted Hugh's comment since most likely it also gives you an answer... – Petru Gardea Nov 25 '11 at 15:28

1 Answers1

0

Visual studio helps you generate sample xml for the xsd. http://www.codeproject.com/Articles/400016/Generate-Sample-XML-from-XSD?msg=4279868

sam
  • 320
  • 3
  • 14