2009-10-19 07:20:42 UTC
Hi,
I'm trying to read a html file stored locally. When I try to parse the character stream, I get the error "Document URI [tekst] is malformed." The code snippet I use is:
`
private String url = "test/domparser/utils_testdoc_1.html";
...
FileReader file = new FileReader(url);
UserAgentContext context = new SimpleUserAgentContext();
DocumentBuilderImpl dbi = new DocumentBuilderImpl(context);
InputSourceImpl inp = new InputSourceImpl(file,"tekst");
Document document = dbi.parse(inp) ;
`
What am I doing wrong?
Any help is appreciated.