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 8 of 8

Thread: Java program to read a XMLs (from a folder) & extract specific values and store it in Excel sheet + Eclipse

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    4
    My Mood
    Worried
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java program to read a XMLs (from a folder) & extract specific values and store it in Excel sheet + Eclipse

    Hi All,

    I am very new to Java and I need some help here.

    I am looking for a java code ( which can be run in eclipse). The code should do the below:
    1) It should pick up XMLs one by one from a folder location ( which should be hard coded )
    2) when it picks up the first XML, it should scan through and get a couple of values like business, order number etc ( User should have an option to specify the tag name as well)
    Sample file
    <Business>Student</Business>
    <OrderNumber>0534</OrderNumber>
    <Code>CZ01</Code>
    <Phone>11</Phone>
    <Sex>F</Sex>

    If he wants to extract the Phone number ( he should be able to enter it "somewhere" & when the code is run it should pick up the tags entered by the user)

    3) On picking the tags from the code ( or from where the user can enter) the code should extract the values from the XML & place it in the excel sheet

    4) It should save the excel sheet in the folder from where it picks the XMLs.

    Please help me out here...

    Regards,
    Blue J


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Java program to read a XMLs (from a folder) & extract specific values and store it in Excel sheet + Eclipse

    Did you have a question?
    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!

  3. #3
    Junior Member
    Join Date
    May 2013
    Posts
    4
    My Mood
    Worried
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java program to read a XMLs (from a folder) & extract specific values and store it in Excel sheet + Eclipse

    Hi Kevin,

    Yes I need a code which does all what i just said, is it possible for you to help me out.. I am very new to Java.

    Please let me know if you need more explanation on the things Ive written.

    Thanks in advance.

    Regards,
    Blue J

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Java program to read a XMLs (from a folder) & extract specific values and store it in Excel sheet + Eclipse

    We can help, but you have to ask a specific technical question first. If you're confused, I recommend reading the link in my signature on asking questions the smart way.

    Simply asking for the code isn't going to work. What have you tried? Where are you stuck? What exactly are you confused about?
    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!

  5. #5
    Junior Member
    Join Date
    May 2013
    Posts
    4
    My Mood
    Worried
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java program to read a XMLs (from a folder) & extract specific values and store it in Excel sheet + Eclipse

    Hi,

    I have not tried anything. I do not know Java.. and i need to work on this assignment. Please help me out.


    Thanks,
    Blue J

  6. #6
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Java program to read a XMLs (from a folder) & extract specific values and store it in Excel sheet + Eclipse

    If you don't know Java, then step 1 will be learning Java. I suggest you start with the basic tutorials, which are the first link returned from a google search of "Java tutorials". Start small.
    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!

  7. #7
    Junior Member
    Join Date
    May 2013
    Posts
    4
    My Mood
    Worried
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java program to read a XMLs (from a folder) & extract specific values and store it in Excel sheet + Eclipse

    Yes I have, but I have to show this in 2 days... I ve tried learning things...but I am finding it very difficult..

    Not a problem if you cant help me with the code...

    I have used the code avail on google but i cant debug the errors, i do not know where to go.

    But thanks for your responses.

    Regards,
    Blue J

  8. #8
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Java program to read a XMLs (from a folder) & extract specific values and store it in Excel sheet + Eclipse

    You won't be able to progress through your course if you keep trying to get others to write the code for you, or if yo just copy-paste code you find on google. You're going to have to learn how to actually program.

    If you ask a specific question about what you found difficult about learning Java, we can help you with that, but we aren't going to just give you code and do your homework 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. read excel sheet into database
    By shri in forum JDBC & Databases
    Replies: 7
    Last Post: March 8th, 2013, 12:51 AM
  2. inserting problem in excel sheet for Java using Eclips
    By bdtuhin007 in forum JDBC & Databases
    Replies: 1
    Last Post: November 3rd, 2011, 08:44 PM
  3. How to convert java executed pgm in eclipse to excel sheet..
    By rajeshwari in forum What's Wrong With My Code?
    Replies: 1
    Last Post: June 17th, 2011, 07:32 AM
  4. Read A File and Store Values into a 2-Dimensional Integer Array?
    By Kimimaru in forum What's Wrong With My Code?
    Replies: 5
    Last Post: February 9th, 2011, 09:13 PM
  5. insert(embed) a file object (.txt file) in MS excel sheet using java.
    By jyoti.dce in forum What's Wrong With My Code?
    Replies: 1
    Last Post: August 12th, 2010, 08:16 AM