Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7073721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:57:48+00:00 2026-05-28T05:57:48+00:00

I read the next answer about load file into java application . I need

  • 0

I read the next answer about load file into java application.

I need to write a program that load .txt, which contains a list of records. After I parse it, I need to match the records (with conditions that I will check), and save the result to XML’s file.

I am stuck on this issue, and I will happy for answer to next questions:

  1. How I load the .txt file into Java?
  2. After I load the file, how I can acsses to the information into it? for example, How I can asked if the first line of one of the records is equal to “1”;
  3. How I export the result to XML’s file.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:57:48+00:00Added an answer on May 28, 2026 at 5:57 am

    one: you need a sample-code for reading a file line by line

    two: the split-method of a string might be helpful. For instance getting the number of the first element if information is seperated by a space

    String myLine;
    String[] components = myLine.split(" ");
    if(components != null && components.length >= 1) {
        int num = Integer.parseInt(components[0]);
        ....
    }
    

    three: you can just write it like any text-file, or use any XML-Writer you want

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I read the next answer about passing function as parameter . Still, I don't
SqlDataReader.Read() is a method which returns a bool but advanced to the next record
I've read that to optimize page load, you should use one css and one
Read about Server push here . I want to push data to client from
I read somewhere once that the modulus operator is inefficient on small embedded devices
I read in this article that a company has created a software capable of
I read about unions the other day( today ) and tried the sample functions
I had asked a question about parsing a file in ruby. I accepted an
I've read many post looking for my answer, but all are similar to this:
I am not an experienced Java programmer and i'm trying to write some text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.