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 8712933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:13:08+00:00 2026-06-13T05:13:08+00:00

I have a Microsoft Word Doc that was saved as a .htm web page.

  • 0

I have a Microsoft Word Doc that was saved as a .htm web page. Below is the code I have. My question is how can I get the text from the document, and append it to a string. I noticed that the paragraph is set to a tag <p class=MsoNormal> so any suggestions. The string I want to append it to is documentText

    String documentText = "";
    FileInputStream fileInput = null;
    BufferedInputStream myBuffer = null;
    DataInputStream dataInput = null;
    fileInput = new FileInputStream(selectedFile);
    myBuffer = new BufferedInputStream(fileInput);
    dataInput = new DataInputStream(myBuffer);
    while (dataInput.available() != 0){
        System.out.println(dataInput.readLine());
    }
  • 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-06-13T05:13:09+00:00Added an answer on June 13, 2026 at 5:13 am

    Take a look at libraries such as HTML Parser and Jericho HTML Parser or use the native HTMLEditorKit.Parser + HTMLEditorKit.ParserCallback approach suggested on this answer.

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

Sidebar

Related Questions

I have hundreds of .doc files with text that I need put on web
I saved a MS-Word Doc with the 'save-as' option of Web Page, Filtered. I
I have code that writes text to a Word document (non-XML) and saves it
I have Microsoft Word template that I automated filling it's fields from my application,
I have the requirement that I need to open a document in Microsoft word
I have quite big document in html format that generated from Microsoft Word. It
I have a very simple Office utility question. Open Microsoft word (2003 or 2007),
I have this code: Microsoft.Office.Interop.Word.Application app = new Microsoft.Office.Interop.Word.Application(); object nullobj = System.Reflection.Missing.Value; object
I have some C# automation code which does interesting things with Microsoft.Office.Interop.Word.Document objects. The
I have a chunk of code that I'm using to read MS Office Word

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.