• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

Creating XML Files

Hi,

I need to create an XML file based on the input of a data file. While reading the data file, i would like to create elements in my output XML file. This is not a problem... but the problem i am having is how to ensure that the elements are being created according to the sequence defined in the schema file. I have no way of knowing which order the elements should appear in. I am looking for a solution can can sort my output XML to conform with the sequence definition of the schema file.

Thansk!
0
da4thrza
Asked:
da4thrza
  • 2
  • 2
3 Solutions
 
radarshCommented:
Try some third party tools. Castor is the best.

http://www.castor.org

What kind of file is the data file?

________
radarsh
0
 
objectsCommented:
if you use javabeans you can just use a bean.
0
 
objectsCommented:
sorry meant xmlbeans :)

http://xmlbeans.apache.org/
0
 
Leo EikelmanCommented:
The easiest way of doing this is to use XMLBeans.

Refer to this link.  It is pretty straight forward

http://www.onjava.com/pub/a/onjava/2004/07/28/XMLBeans.html
0
 
Leo EikelmanCommented:
that's fine with me

Leo
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now