2

I'm getting a list in java that contains name of variables and their types. I want to generate xsd from this list, but I understand that I have to create xml before.

so how do I create xml from list in Java?

Frank Visaggio
  • 3,642
  • 9
  • 34
  • 71
Erez
  • 51
  • 1
  • 5
  • 1
    can you please edit your question and add an example to illustrate your list and the xml you want to generate? There are hundreds of different ways to generate a xml in Java. – Guido Jul 24 '12 at 08:08
  • Why do you need to generate an XML? I create XSDs with no XML, but I just create them manually – Woody Jul 24 '12 at 08:10

1 Answers1

2

The key is separating your list into a class to hold it . Once that is done you can work on converting it to and from XML. You can read more about XML here

A good tool to do this is xstream:

Heres a good post to show you how to use Xstream here

Community
  • 1
  • 1
Frank Visaggio
  • 3,642
  • 9
  • 34
  • 71
  • it can't be done since the list is dynamic and is different in each run - different variable names, different types. – Erez Jul 24 '12 at 14:38