You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Boris Garbuzov <bo...@keystrokenet.com> on 2000/04/03 18:32:36 UTC

HTML

I am trying to find out dom.html package fuctionality. The following code

    File file = new File (HTML_FILE);
    Reader reader = new FileReader (file);
    InputSource inputSource = new InputSource (reader);
    DOMParser parser = new DOMParser();
    parser.parse (inputSource);
    HTMLDocument htmlDocument = (HTMLDocument) parser.getDocument(); // here it fails

fails the following way:

java.lang.ClassCastException: org.apache.xerces.dom.DeferredDocumentImpl
        at com.keystrokenet.loanproduct.xml.test.HtmlLab.executeTestBody(HtmlLab.java:39)

What is a usual begining code for using the package on existing HTML file?

--
Boris Garbuzov.
Mailing address:
Box 715, Seattle, Washington, 98111-0715, USA.
E-mail: garbuzov@hotmail.com, boris@keystroke.com.
Telephone: 1(206)781-5165 (home), 1(206)576-4549 (office).
Resedential address: 139 NW 104 Street, Seattle, 98177, Wa, USA



Re: HTML

Posted by Boris Garbuzov <bo...@keystrokenet.com>.
Boris Garbuzov wrote:

>
>
> I am trying to find out dom.html package fuctionality. The following code
>
>     File file = new File (HTML_FILE);
>     Reader reader = new FileReader (file);
>     InputSource inputSource = new InputSource (reader);
>     DOMParser parser = new DOMParser();
>     parser.parse (inputSource);
>     HTMLDocument htmlDocument = (HTMLDocument) parser.getDocument(); // here it fails
>
> fails the following way:
>
> java.lang.ClassCastException: org.apache.xerces.dom.DeferredDocumentImpl
>         at com.keystrokenet.loanproduct.xml.test.HtmlLab.executeTestBody(HtmlLab.java:39)
>
> What is a usual begining code for using the package on existing HTML file?
>
> --
> Boris Garbuzov.
> Mailing address:
> Box 715, Seattle, Washington, 98111-0715, USA.
> E-mail: garbuzov@hotmail.com, boris@keystroke.com.
> Telephone: 1(206)781-5165 (home), 1(206)576-4549 (office).
> Resedential address: 139 NW 104 Street, Seattle, 98177, Wa, USA
>
>

-------------------------
And I do not understand the package's functionality at all. What
open-close-write methods do? Is there any tutorial?

--
Boris Garbuzov.
Mailing address:
Box 715, Seattle, Washington, 98111-0715, USA.
E-mail: garbuzov@hotmail.com, boris@keystroke.com.
Telephone: 1(206)781-5165 (home), 1(206)576-4549 (office).
Resedential address: 139 NW 104 Street, Seattle, 98177, Wa, USA