Java code to convert text files to xml

Discussion in 'XML' started by mave, Apr 16, 2004.

  1. mave

    mave Guest

    Is anyone aware of a Java program preferably w/ source code to convert
    files in text format to xml format?


    Pls. let me know if you are aware of such a program.
    mave, Apr 16, 2004
    #1
    1. Advertising

  2. In article <>,
    (mave) wrote:

    >:Is anyone aware of a Java program preferably w/ source code to convert
    >:files in text format to xml format?
    >:
    >:
    >:pls. let me know if you are aware of such a program.


    Not likely, since the details of the text format and the desired XML
    document structure are up to you. You just need to write something that
    reads the text file, since you know its structure, and builds the XML
    document the way you want it from the data, then writes it.

    = Steve =
    --
    Steve W. Jackson
    Montgomery, Alabama
    Steve W. Jackson, Apr 16, 2004
    #2
    1. Advertising

  3. mave

    Guest

    "Steve W. Jackson" <> wrote in message news:<-berlin.de>...
    > In article <>,
    > (mave) wrote:
    >
    > >:Is anyone aware of a Java program preferably w/ source code to convert
    > >:files in text format to xml format?
    > >:
    > >:
    > >:pls. let me know if you are aware of such a program.

    >
    > Not likely, since the details of the text format and the desired XML
    > document structure are up to you. You just need to write something that
    > reads the text file, since you know its structure, and builds the XML
    > document the way you want it from the data, then writes it.
    >
    > = Steve =


    Hi Steve,

    Have you written something to build XML documents as you describe?

    L
    , Apr 18, 2004
    #3
  4. In article <>,
    wrote:

    >:"Steve W. Jackson" <> wrote in message
    >:news:<-berlin.de>...
    >:> In article <>,
    >:> (mave) wrote:
    >:>
    >:> >:Is anyone aware of a Java program preferably w/ source code to convert
    >:> >:files in text format to xml format?
    >:> >:
    >:> >:
    >:> >:pls. let me know if you are aware of such a program.
    >:>
    >:> Not likely, since the details of the text format and the desired XML
    >:> document structure are up to you. You just need to write something that
    >:> reads the text file, since you know its structure, and builds the XML
    >:> document the way you want it from the data, then writes it.
    >:>
    >:> = Steve =
    >:
    >:Hi Steve,
    >:
    >:Have you written something to build XML documents as you describe?
    >:
    >:L


    Not personally, but my coworker has done this. Our application does
    high end modeling and simulation, using XML documents for the saved
    model format. He worked on the previous incarnation of the application,
    which used a completely different (pure text) file structure. So he put
    together an "importer" that read the old file and put it into the
    appropriate structure for our application.

    It's just a matter of deciding what the structure of your XML document
    should be and knowing what's in the text file. You create a new XML
    document with appropriate code in Java, then add/manipulate elements and
    attributes as needed to obtain the desired result.

    = Steve =
    --
    Steve W. Jackson
    Montgomery, Alabama
    Steve W. Jackson, Apr 19, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. crazyprakash
    Replies:
    4
    Views:
    3,370
    adrian
    Oct 30, 2005
  2. Replies:
    4
    Views:
    949
    M.E.Farmer
    Feb 13, 2005
  3. Replies:
    1
    Views:
    481
    Andreas Wollschlaeger
    Oct 6, 2006
  4. Royan
    Replies:
    8
    Views:
    747
    Patricia Shanahan
    Feb 15, 2008
  5. Replies:
    2
    Views:
    177
    John Bokma
    Aug 30, 2013
Loading...

Share This Page