how to generate XML from XML schema in java and feed data in it?

undusioli

New Member
I am developing part of a web app which takes an XML schema as input to generate an XML file. There is also data to be put into the XML tags in an ordered way.for example, I will have an ArrayList of 100 numbers, say, 1 to 100and the .xsd would look like the following example:xs:element name="elt1"xs:complexType\[code\]xs:sequence xs:element name="elt1-1" xs:element name="elt1-2" xs:element name="elt1-3" xs:element name="elt1-4" xs:element name="elt1-5"xs:sequence\[/code\]xs:complexTypexs:element name="elt1" ......other elementshow can I generate an XML file like the following:< elt1>< elt1-1>1< elt1-1>< elt1-2>2< elt1-2>< elt1-2>3< elt1-3>< elt1-4>4< elt1-4>< elt1-5>3< elt1-5>< elt1>so that data in each tag is the corresponding number in the arraylist, in the same order of the data in the arraylist?I would really appreciate any suggestion or exmaple. Thanks in advance!
 
Back
Top