Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Convert Text files to XML

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    8
    My Mood
    Confused
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Convert Text files to XML

    Hi,

    Is anyone aware of a Java program to convert
    files in text format to xml format?
    or even from excel to XML format. The excel or text file contains information like name, age, address and so on.

    Pls. let me know if you are aware of such a program.
    Thanks in advance.


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Convert Text files to XML

    Hello,

    You could always write this program yourself

    I'm pretty sure I've done something like this in the past. Please do a search on the forums.

    You would basically need to read in the text file, grab the data you want and write it out again.
    There are lots of code examples here: Java Code Snippets and Tutorials - Java Programming Forums

    Look into the Scanner class.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  3. The Following User Says Thank You to JavaPF For This Useful Post:

    HelloAll (March 3rd, 2011)

Similar Threads

  1. Convert text to excel
    By mamta_techie in forum JDBC & Databases
    Replies: 1
    Last Post: December 27th, 2010, 12:15 PM
  2. java program to copy a text file to onother text file
    By francoc in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: April 23rd, 2010, 03:10 PM
  3. Reading and Writing Text Files
    By kappasig84 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: March 1st, 2010, 07:16 PM
  4. Merge 2 Sorted Text Files into a Third
    By Epyllion in forum What's Wrong With My Code?
    Replies: 0
    Last Post: February 10th, 2010, 08:24 PM
  5. convert GSM to PCM (wav)
    By cilang in forum Java Theory & Questions
    Replies: 4
    Last Post: August 7th, 2009, 03:46 AM