Results 1 to 9 of 9
Thread: HTML FILE parsing.
- 03-14-2009, 11:50 AM #1
- 10-25-2010, 04:35 PM #2
Member
- Join Date
- Sep 2010
- Posts
- 26
- Rep Power
- 0
HTML File Parsing
Okay, my friend, I could create a HTML parsing called XML Parser . Now I need any confirmation from you to can compile this HTML to you . I will send this HTML as attachments right, Thanks
Furthermore, if you want to see my posted java program called HTML web page parsing scraping is was posted in advanced forum.
- 10-25-2010, 04:49 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 10-26-2010, 04:34 PM #4
Member
- Join Date
- Sep 2010
- Posts
- 26
- Rep Power
- 0
HTML File parsing
That's right, my partner Josha, my question is do you want to compile a HTML Parse Demo with HTMLEditorKit.Parser tell me please
I will do it for you because I found a lots of codes as HTMLEditorkit.Parser.
Tell me, if you want that I compile this project for you exactly.
Thanks
- 10-28-2010, 05:09 PM #5
Member
- Join Date
- Sep 2010
- Posts
- 26
- Rep Power
- 0
HTML File parsing
Josha tells me if you want to compile HTMLEditorKit.Parser beccause I found a lots of codes that are applicable to his program. I will compile this for you.
Thanks once more francojava1.
- 10-28-2010, 05:16 PM #6
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 10-28-2010, 05:16 PM #7
Member
- Join Date
- Sep 2010
- Posts
- 26
- Rep Power
- 0
Francojava1 is needing urgent reply from you about HTMLEditorkit.Parser codes because Iam going to compile these codes for you . Tell me please .Thanks
- 10-28-2010, 05:21 PM #8
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 11-02-2010, 03:00 PM #9
Member
- Join Date
- Sep 2010
- Posts
- 26
- Rep Power
- 0
HTML File parsing
Josah, francojava1, could compile this project very good with the following codes.
package javax.swing.text.html;
import java.io.*;
import java.net.*;
import javax.swing.text.html.parser.*;
import javax.swing.text.html.*;
/*
*
* @author User: Alfonso Franco, who developed this demo
* program how to use the HTMLEditorkit.Parser and its implementing class ParserDelegator in the Swing system. Also, as a
* file is calling back to the HTMLParseLister being object.
*/
public class HTMLParseDemo {
public static void main(String[] args) {
Reader r;
if ( args.length == 0 ){
System.out.print("Usage: java HTMLParseDemo [ url | file ] ");
System.exit(0);
}
String spec = args[0];
try {
if ( spec.indexof(" :// ") > 0) {
URL u = new URL(spec);
Object content = u.getContent();
if (content instanceof InputStream) {
r = new InputStream ((InputStream)content);
}
else if (content instanceof Reader) {
r = (Reader)content;
}
else {
throw new Exception (" Bad URL content type.");
}
}
else {
r = new FileReader(spec);
}
HTMLEditorkit.Parser parser;
System.out.print(" About to parse " + spec);
parser = new ParserDelegator();
parser.equals(" r, new HTMLParseLister(), true " );
}
catch (Exception e) {
System.err.printIn("Error: " + e );
e.printStackTrace(System.err);
}
}
}
Similar Threads
-
html web page parsing/scraping
By orchid in forum Advanced JavaReplies: 3Last Post: 10-21-2010, 01:34 PM -
Error while parsing html page in java on linux
By rdhaware in forum Advanced JavaReplies: 1Last Post: 02-20-2009, 02:20 AM -
How can I include a html file in html textarea?
By surya_dks in forum New To JavaReplies: 2Last Post: 10-04-2008, 07:20 AM -
Parsing HTML
By jaadu25 in forum Advanced JavaReplies: 6Last Post: 07-20-2008, 06:51 PM -
jeditorpane help parsing html
By asifsolkar in forum Advanced JavaReplies: 4Last Post: 12-14-2007, 05:23 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks