How to convert a HTML files into a text file using Java

Hi guys...!
I was wondering if there is a way to convert a HTML file into a text file using java programing language. Likewise I would also like to know if there is a way to convert any type of file (excel, power point, and word) into text using java.
By the way, I really appreciated the help that you guys gave me on my previous topic on how to extract tests from a pdf file.
Thank you....

HTML files are already text files. What do you mean you want to convert them?
I think if you search the web, you can find things for converting those MS Office files to text (or extracting text from them, as I assume you mean).

Similar Messages

  • How to convert a webpage program into a pdf file?

    how to convert a webpage program into a pdf file?

    Hi Federico,
    ExportPDF is the program to convert PDF into different Formats(Doc, Docx, xlsx, rtf) and not Vice Versa, I would suggest you to use CreatePDF Web application for converting any other format to PDF.
    For more details on CreatePDF
    https://www.acrobat.com/createpdf/en/home.html
    FAQ to be found here:
    http://forums.adobe.com/community/createpdf?view=documents
    ~Pranav

  • How to output a query results into a text file

    How to output a query results into a text file instead of outputing it to the screen..
    is there a way for us to write a SQL query which specifies to output the query results to a text file.
    Pls let me know how to do it
    Thanking u in advance
    regards
    Muraly

    Muraly,
    If you are using SQL*Plus 8.1.6 or later, you can also spool output to a file in HTML format, eg
    SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON
    SPOOL c:\temp\report.html
    SELECT DEPARTMENT_NAME, CITY
    FROM EMP_DETAILS_VIEW
    WHERE SALARY>12000;
    SPOOL OFF
    SET MARKUP HTML ENTMAP OFF
    In iSQL*Plus 9.0.1 (the browser-based interface to SQL*Plus) onwards, you can also send the HTML output to a new web browser window, or an html file -- much easier than the command line method.
    Alison

  • How to convert my MM alias into an AppleID to use it with iCloud?

    I used MobileMe and created a mail that became my Apple ID. Then I created an alias that became my main e-mail so now with iCloud I wish that aslias could become my Apple ID. I don't care to loose the first Apple ID but "How to convert my MM alias into an AppleID to use it with iCloud?"

    You cannot convert an alias to Apple ID.
    You can transfer your MM to iCloud with your main Apple ID.
    There will be your alias as well.
    Regards

  • How to converting a flash clip into a bmp file quickly

    Hi,
    I’d like to get help on converting a flash clip into a
    bmp file. I have an application developed with ActiveX technology.
    There is a flash control embedded in the ActiveX control, which has
    a printing button. The end users can press the printing button to
    print the flash picture as well as other text content.
    I get the flash picture for printing in follow steps:
    1.Create a BitmapData object
    var bmp:BitmapData = new BitmapData(w, h, false);
    2.Obtain the image of current flash
    bmp.draw(mc, mc.transform.matrix, new ColorTransform(), 1,
    new Rectangle(x, y, w, h));
    3.Get pixels of flash image one by one in loop, and save them
    into a PixelCollection
    bmp.getPixel(col, row);
    4.Move the PixelCollection into flash container
    fscommand("print", load_PixelCollection);
    5.Ocx control gets the PixelCollection and converts it into
    BMP format
    But I find it is very slow when action script gets pixels one
    by one. Getting pixels of a middle size flash may spend one minute.
    It is hard for our customer to stand. Does anyone have idea to get
    the flash image quickly? 
    Any help is appreciated.
    Shi Hang

    What about the built-in print methods, wouldn't it be better
    to use those here?
    Getting all pixel values is a time intensive process, because
    of the amount of pixels. It may be a bit faster if you split the
    getPixel() loop over some frames, but I'm not exactly sure how to
    do that (just read it somewhere).
    If the content is fixed, you could create the pixel array in
    the background while the user looks at it. This is quite some
    overhead, but when the user decides to print, the array would
    already be there.
    Finally, not helpful here, but interesting:
    quote:
    BitmapData.getPixels()
    No longer do you have to loop through every pixel in a
    bitmap, one at a time with getPixel to send a bitmap to the server.
    This method returns a ByteArray containing the hexadecimal color
    value of each of the pixels in the specified rectangular region of
    a bitmap. Use this method in conjunction with the new ZLib
    compression method; ByteArray.compress() to compress and send a
    bitmap over the wire to a server so it can be converted into a file
    ready for downloading.
    (from
    http://www.flashguru.co.uk/actionscript-3-new-capabilities/)
    This will be available in AS 3.
    hth,
    blemmo

  • How to convert MS SQL Server data to XML data using Java

    Hi all!
    How do I generate XML document for SQL Server data using java / jsp.
    Thanks in advance

    http://www.fdsapi.com

  • How to convert DTD files into XML(template) by using Java ?

    I am a beginner to java,and want to convert a random DTD file
    into a XML template(having no data).
    any guys can give me some suggestions ?
    thanks very much

    DTD allow you to validate a XML file.
    To do so, you can use API such as dom or xalan.
    To transform an XML file from a vocabulary A to vocabulary B, you have to write a XSLT style sheet, and use xerces to perform the transformation.
    Using tools such as XSL-FO, you can transform your XML into PDF.

  • Making an ASCII file into a text file

    Hi-
    I am trying to read the lines of an ASCII file as Strings and write them to a new text file. Eventually I will modify the info in the lines, but for now I'm just trying to get the flow from one file to another. I can't figure out how to write a String to a new file. Below is the code that I've written so far, followed by the error that i get when I run it (it compiles fine). One problem I see is that FileWriters are made to write characters, but I want to write Strings to a new file. How do I get around this?
    import java.io.*;
    import java.lang.*;
    import java.util.*;
    class Delimiter {
    public static void main (String[] args) throws IOException {
    try {
    File inputFile=new File("test.asc");
    File outputFile=new File(test.txt");
    BufferedReader in=new BufferedReader(new FileReader(inputFile));
    BufferedWriter out=new BufferedWriter(new FileWriter(outputFile));
    String line=" ";
    while (line != null) {
    line=in.readLine();
    out.write(line);
    out.newLine();
    in.close();
    out.close();
    } catch (IOException e) {
    ERROR:
    Exception in thread "main" java.lang.NullPointerException
    at java.io.Writer.write(Unknown Source)
    at Delimiter.main(Delimiter.java:23)

    sorry, I responded too quickly. I put out.write(null);
    just before the in.close(); statement and got an error
    saying that command is ambiguous b/c write() could
    belong to multiple classes. did you mean that I should
    put it in the while loop?I didn't mean for you to put
    out.write(null);
    in your code. I meant to point out that when 'line' is null, the problem is that you are passing a null to the out.write() method. That is bad. Don't do that. Use the above. It will test for null before doing the write().

  • How to convert a JSP page into a PDF file?

    I am calculating and generating a bill in JSP?
    I want the output JSP page from the server to get converted to a PDF file.
    How to do this?
    Please help me doing this!

    Hai CeciNEstPasUnProgrammeur
    Actually I didnt mean what you are asking?
    I will put it in this way,
    I am having a JSP output.
    If I save that page in the browser it should get
    saved as a PDF File,
    This is my problem,As far as I can see, you have two options:
    1) Ensure you have some kind of rendering tool installed on the server, render your JSP to that engine, capture the output as an image and transform the image to a PDF. Or a variation on that server-side theme.
    2) Take the data you would be/are pushing into a JSP, offer a "download" facility that just takes that data and wraps it into a PDF. Your server then serves out that PDF file.
    To save the browser view (your JSP) as a PDF each client machine would need to be set up with some mechanism to capture and save as PDF. You can't control that.
    I've had to do something similar in the past. In that case though we had a simplar task of just generating a stored HTML file that we could store in the DB and lock down. Our approach was to use XSLT over the generated XML data structure.
    I'd advise you doing the same and generating an XML file and then running an XSLT/FO process over it to generate your PDF file. Don't try to do all the fancy stuff on the client environment, that's an environment you usually have very little control over.

  • Download Internal Table into a Text File in BSP?

    I have an internal table which i need to download into my local pc. I know i can not use FM gui_download. Could some one please post code on how to download the internal table into a text file in BSP. Also i am not sure if i can use save dialog FM. Also need suggestion on which FM to use for save dialog which tells where to save the file.
    Any help will be appreciated.
    Thanks
    Nahman

    This might be a good starting point.
    <a href="/people/thomas.jung3/blog/2004/09/02/creating-a-bsp-extension-for-downloading-a-table">/people/thomas.jung3/blog/2004/09/02/creating-a-bsp-extension-for-downloading-a-table</a>

  • How To Re-Input More Data To A Text File?

    I was wondering if anyone could tell me how to re-input more data into a text file? I don't want to over-write the text file, but just add more data to it. The current code i have is:
    import java.util.Scanner;
    import java.io.*;
    class trialanderror002 {     
    public static void main(String args[]){     
         Scanner input = new Scanner(System.in);
         String str;
    FileOutputStream out;
    PrintStream p;
    try{
         out = new FileOutputStream("c:\\products.txt");
         p = new PrintStream(out);
         System.out.println("Please insert text to be written to file...");
         str = input.next();
         p.println (str);
         p.close();
    catch (Exception e){
         System.err.println ("Error writing to file");
    Basically, after each time the program is ran, i'd like to insert another line of data into products.txt.
    Is there a way for me to loop the program too and not remove the data from the text file?
    thanx...

    just one more question...
    i've figured out the code to retrieve the text file and print it to screen...but how do i go about only printing parts of my text file?
    So supposing my text file has 5 lines of data/text etc, how would i make it print the first line?...or the second line?...or the third....etc etc...
    the current code i now have is:
    package Assignment1;
    import java.util.Scanner;
    import java.io.*;
    class trialanderror002 {     
    public static void main(String args[]){     
         Scanner input = new Scanner(System.in);
         String str;
    FileOutputStream out;
    PrintStream p;
    try{
         out = new FileOutputStream("c:\\trial.txt", true);
         p = new PrintStream(out);
         System.out.println("Please insert text to be written to file...");
         str = input.next();
         p.println (str);
         p.close();
    catch (Exception e){
         System.err.println ("Error writing to file");
              try {
              FileReader file = new
              FileReader("c:\\trial.txt");
              BufferedReader buff = new
              BufferedReader(file);
              boolean eof = false;
              while (!eof){
                   String line = buff.readLine();
                   if (line == null)
                        eof = true;
                   else
                        System.out.println(line);
              buff.close();
              }catch (IOException e){
                   System.out.println("Error -- " + e.toString());
    }

  • How to write the location of a file in a text file?

    Hello All,
    I am doing a POC with the following scenario:
    Steps:
    1. Move a file from one location in your system to another location, say from C drive to D drive.
    2. After that i want to write the new location of the file in a text file.
    I have succesfully moved the file from C drive to D drive using the File Adapter and also FTP Adapter. However I am unable to copy or write the new location of the file into a text file. Please provide me any suggestions regarding this issue i am facing. Your help and support is highly appreciated. Thanks in advance.

    Hi,
    If want the file directory name to be captured in the BPEL process then add <element name="directory" type="string"/> in the inbound or outbound adapter header wsdl file. Then declare a variable of the header message type and in the 'adapter' tab of the receive or invoke activity select that variable which you previously created.
    Hope this helps.
    Rdgs.

  • How to convert an html/css website into muse

    How to convert an html/css website into muse.

    Hi,
    It is not possible to convert html/css site into Muse. Muse recognizes .muse files only.
    Regards,
    Aish

  • How do I convert an audio link into a wav file?

    how do I convert an audio link into a wav file with my Imac?
    A PC user showed me to right click an audio link where it asked if it wanted to save the link as a Wav file?
    I saw this done in front of me. How do I do it with my Mac ?

    This is how to do it in itunes http://support.apple.com/kb/ht1550
    If I view the song in finder, all that i have to do is press command-i and it opens a window. In the section where you view the name and extension I took off the extension (.mp3 in my case) and replaced it with .wav

  • How can I convert my Open Source document files into Word document files? I cannot download Pages since my Macbook Air does not have the most recent software.

    How can I convert my Open Source document files into Word document files? I cannot download Pages since my Macbook Air does not have the most recent software. I downloaded open office to my mac to try and save money. It worked well for a while. Now I get this pop-up message that asks me to "Reopen" and when I select the option, nothing happens. I cannot save my documents anymore and I cannot convert them to word. Help!

    dwb wrote:
    Does OpenOffice output Word documents by default or do you have to select it manually?
    You have 17 options to save as in Open Office, one of which is .doc  files,  yes it needs to be saved manually.
    You may be able to default to DOC, but have not tried same.
    Since Open Office is 99% same as Word, I use it, or Word, either one.  Open Office is a bit less buggy than Word 11'

Maybe you are looking for

  • What are the disadvantages of maintaining the source list?

    Hi, I understand that once source list is activated for plant in customizations, it has to be maintained for all the materials which are extended for the said plant, Is it true? Can I maintain only for selected materials? I also understand if it is m

  • Economic Order Quantity Calculation in SAP ERP

    Hello, Has anybody worked on calculating EOQ in ERP (MRP process)? I know that there is a calculation method for EOQ in SCM APO-Service Parts Planning (SPP) but I couldn't find any formula or lot-size calculation method for EOQ in ERP. Could anyone h

  • Compilation Albums are not ordered by track order - by alphabet/artist

    This is something I just noticed with iTunes that I would like to have fixed if possible. I've ripped a good handful of compilation albums onto my computer, and when I put them into iTunes, and order the songs by album, all of the differing artists o

  • Installing USB Serial Driver on Windows XP

    Have a new XP based pc. No serial port for my old PalmPilot (circa 1997) to dock to though. No worries I thought. Bought a USB-Serial connector and downloaded the USB-Serial Adaptor software from the Pilot website. Only problem is, the hardware doesn

  • How to we run the command  Create Sdmkitjar

    Hii Ep Gurus             Pl let me know where do i run the command createsdnmkitjar Thanks In Advance Johny