XML convert text with Java

Hi everyone, I am trying to get this code to work, but not getting the right results. It is like the sample1.txt is not being read for me to convert it to XML any time i run it my XML does not fill in the information, First_Name, Last_Name ect.

Thank you.

package bolyardassign2;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;

public class BolyardAssign2 {

/*
Convert XML file to this outline.

-

-<account>

-<manager employeeId="56512">

    <lastName>THOMAS</lastName>

    <firstName>KACI</firstName>

</manager>

-<location>

    <city>BRADFORD</city>

    <state>TN</state>

    <zipcode>37059</zipcode>

</location>

-

    <company>ENCOMPASS SERVICES CORPORATION</company>

    <company>BURLINGTON COAT FACTORY WAREHOUSE CORPORATION</company>

    <company>WEATHERFORD INTERNATIONAL, INC</company>

    <company>CYTEC INDUSTRIES, INC</company>

</companies>

</account>

*/
public static void main(String args) {

    System.out.println("--- Wlcome to Bolyard's XML Converter");
   
    Scanner scanner = new Scanner(System.in);
    
    // Load txt file, sample1 or sample2
    System.out.println("Enter the input filename: ");
    String sampletxt = scanner.next();
    
    // Convert file to xml "data.xml"
    System.out.println("Enter the outputfile filename");
    String dataxml = scanner.next();
    
    //Complate conversion
    System.out.println("Conversion complete. Data written to data.xml");
    
    
    outputXML("data.xml", sampletxt, dataxml);
}

public static void outputXML(String filename, String sampletxt, String dataxml)
{
    
    try {
        try (PrintWriter pw = new PrintWriter(filename)) {
            //String *** the null is there for now so the code can run ***
String Id = null;
String firstName = null;
String lastName = null;
String city = null;
String state = null;
String zip = null;
String count = null;
String companyname = null;

            pw.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
            pw.println("<!-- XML Converter byWe-Code-Stuff, LLC.Developer: Bolyard -->");
            pw.println("<accounts>");
            pw.println("<account>");                
            pw.println("<manager employeeId>" + Id);                
            pw.println("<first>" + firstName + "</first>");                
            pw.println("<last>" + lastName + "</last>");
            pw.println("</manager>");
            pw.println("<location>");                
            pw.println("<city>" + city + "<city>");                
            pw.println("<state>" + state + "</state>");                
            pw.println("<zipcode>" + zip + "</zipcode>");               
            pw.println("<companies count>" + count);                
            pw.println("<companies>" + companyname + "</companies>");
            pw.println("</companies>");
            pw.println("</location>");
            pw.println("</account>");
            pw.println("</accounts>");
        }
    } catch (FileNotFoundException ex) {
        System.out.println("Error: " + ex);
    }

}
public static void checkFileName(Scanner scanner, ArrayList data)
{
String fileName;
boolean fileExists;
do {

        System.out.println("Please Enter name");
        fileName = scanner.next();
        
        try{
        
        File inputFile = new File (fileName);
        Scanner fileScanner =new Scanner (inputFile);
        
        while(fileScanner.hasNextLine()){
        String line =fileScanner.nextLine();
        data.add(line);
    }
        
    fileExists = true;
    }catch (FileNotFoundException ex){   
        System.out.println("ERROR:  " + ex);
        fileExists = false;
    }
    } while (!fileExists);
}

}

—Example of Input RUN— Mine does not do this i can type in any .txt it does not check.
— Welcome to Bolyard’s XML Converter —
Enter the input filename: blah.txt
WARNING: Cannot open blah.txt
Enter the input filename: sample1.txt
Enter the output filename: blah.txt
WARNING: blah.txt is not an XML filename
Enter the output filename: .xml
WARNING: .xml is not an XML filename
Enter the output filename: data.xml
Conversion complete. Data written to data.xml

—XML output—

My XML output “BLUE”, I told the code to say null for trouple shooting, but i can get the real information inside of it.