• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • 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 EikelmanDirector, IT and Business DevelopmentCommented:
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 EikelmanDirector, IT and Business DevelopmentCommented:
that's fine with me

Leo
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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