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.


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

Results 1 to 2 of 2

Thread: How to Convert following XML to ArrayList

  1. #1
    Junior Member
    Join Date
    Apr 2014
    Pune, India
    Thanked 0 Times in 0 Posts

    Default How to Convert following XML to ArrayList

    Hello Expert,

    I am new on java. I have following xml file structure.
    What I need to do is that
    1) Read this xml file and convert to arraylist.
    2) insert this arrayList into Mysql database.

    Please help out

    XML File is

    <?xml version="1.0"?>
    <addr >
    <telecom />
    <firstname>TFnam tMidName tLastName</firstname>
    <testname>Collage - Executive Health Chk Up - Male</testname>
    Test can be more

  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Washington, DC
    My Mood
    Thanked 632 Times in 540 Posts

    Default Re: How to Convert following XML to ArrayList

    What exactly should the ArrayList contain? Write out the rules you want to follow, then write methods that follow those rules.

    You could also look into XML libraries like jaxb that handle XML conversion for you.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. convert arraylist to 2D array
    By ishrne in forum Object Oriented Programming
    Replies: 5
    Last Post: April 5th, 2013, 07:57 AM
  2. [SOLVED] How convert sting name as an arrayList name?
    By Purple01 in forum Java Theory & Questions
    Replies: 0
    Last Post: November 27th, 2012, 06:46 AM
  3. convert excel to xml and read the input from xml file
    By rahulruns in forum Object Oriented Programming
    Replies: 5
    Last Post: April 3rd, 2012, 11:13 AM
  4. Convert Text files to XML
    By HelloAll in forum Java Theory & Questions
    Replies: 1
    Last Post: February 2nd, 2011, 04:01 AM
  5. [SOLVED] Extracting an How to ArrayList from an ArrayList and convert to int??
    By igniteflow in forum Collections and Generics
    Replies: 2
    Last Post: August 16th, 2009, 01:11 PM

Tags for this Thread