Donate Share

Lobo - Java Web Browser

Subscribe

Document URI is malformed

  1. 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.

< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.