Creating XML Files

Posted on 2006-03-20
Last Modified: 2010-03-31

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.

Question by:da4thrza
    LVL 10

    Accepted Solution

    Try some third party tools. Castor is the best.

    What kind of file is the data file?

    LVL 92

    Expert Comment

    if you use javabeans you can just use a bean.
    LVL 92

    Assisted Solution

    sorry meant xmlbeans :)
    LVL 8

    Assisted Solution

    by:Leo Eikelman
    The easiest way of doing this is to use XMLBeans.

    Refer to this link.  It is pretty straight forward
    LVL 8

    Expert Comment

    by:Leo Eikelman
    that's fine with me


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
    An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
    Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
    The viewer will learn how to implement Singleton Design Pattern in Java.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now