Question: Please Help me with this Java coding. I will appreciate it. This is one of examples: package readfromfileusingscanner; import java.io.File; import java.io.PrintStream; import java.util.Iterator; import

Please Help me with this Java coding. I will appreciate it.

Please Help me with this Java coding. I will appreciate it. Thisis one of examples: package readfromfileusingscanner; import java.io.File; import java.io.PrintStream; import java.util.Iterator;

This is one of examples:

package readfromfileusingscanner;

import java.io.File; import java.io.PrintStream; import java.util.Iterator; import java.util.LinkedList; import java.util.Scanner;

public class ReadFromFileUsingScanner {

/** * */ public static void printHeader() { System.out.println(""); System.out.println(""); System.out.println(""); } /** Main Method * * @param args * @throws Exception * REad a file and display on the console */ public static void main(String[] args) throws Exception { printHeader(); LinkedList theLines ; theLines = new LinkedList (); // pass the path to the file as a parameter File file = new File("FightRaidersFight.txt"); Scanner sc = new Scanner(file); String aLine=""; while (sc.hasNextLine()) { aLine = sc.nextLine(); theLines.add(aLine); System.out.println(aLine); } sc.close(); File outFile = new File("output.txt"); PrintStream output = new PrintStream (outFile); Iterator itr = theLines.iterator(); while (itr.hasNext()) output.println(itr.next()); output.close(); } }

PROJECT DESCRIPTION You need to code a program in Java that takes an HTML document file in the English language as input and produce a text document as output. The output document contains only the text information that a web browser display by reading the file, without the presentation details the markup language specified. Your program needs to Extract Titles, section headers, paragraphs, and tables. The output of the program would be recorded in a text file containing the text without any format. Tables rows would be rendered like a sequence of values separated by commas for each row in the table. Text file contains HTML in Browser Matador Song Matador Song Fight, Matadors, for Tech! Songs of love we'll sing to thee, Bear our banners far and wide Ever to be our pride Fearless champions ever be. Stand on heights of victory. Strive for honor evermore, Long live the Matadors! Fight, Matadors, for Tech! Songs of love we'll sing to thee, Bear our banners far and wide. Ever to be our pride Fearless champions ever be. Stand on heights of victory. Strive for honor evermore. Long live the Matadors! Music by Harry Lemaire, words by R.C. Marshall Music by Harry Lemaire, words by R.C. Marshall HTML in Browser Text file contains Our Customers Our Customers Company Contact Country Alfreds Futterkiste Maria Anders Germany Centro comercial Moctezuma Francisco Chang Mexico Ernst Handel Roland Mendel Austria Island Trading Helen Bennett UK Laughing Bacchus Winecellars Yoshi Tannamuri Canada Magazzini Alimentari Riuniti Giovanni Rovelli Italy Company, Contact, Country Alfreds Futterkiste, Maria Anders, Germany Centro comercial Moctezuma, Francisco Chang, Mexico Ernst Handel, Roland Mendel, Austria Island Trading, Helen Bennett, UK Laughing Bacchus Winecellars, Yoshi Tannamuri, Canada Magazzini Alimentari Riuniti, Giovanni Rovelli, Italy

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!