W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2000

Re: DOMElementImpl

From: Gary L Peskin <garyp@firstech.com>
Date: Tue, 28 Nov 2000 09:37:51 -0800
Message-ID: <3A23ED6F.A759A029@firstech.com>
To: Philippe QUERREC <pquerrec@cosmosbay.com>, Html-Tidy <html-tidy@w3.org>
Philippe QUERREC wrote:
> 
> When we extract a DOM tree of a stream from an URL, we can't use it with
> Xerces, because we have org.w3c.tidy.DOMElementImpl element instead of Node
> element. Is there any cast available in any code fragments ?
> 
> Actually, I write the DOM on disk, and re-open it as a XML file, it works
> but use too many i/o instructions.
> 
> Thanks for your help
> Pils

Pils --

I assume you're talking about JTidy here.  DOMElementImpl does extend
DOMNodeImpl which implements org.w3c.dom.Node.  So a DOMElementImpl is a
Node.  Unfortunately, there is no other cast available here.  You'd have
to walk the JTidy DOM tree and generate calls to Xerces to build your
DOM there.

We do have SAX support forthcoming for JTidy.  Not sure when it will be
available but, when it is, you'll be able to fire SAX events from JTidy
and use Xerces as your ContentHandler and get full Xerces functionality.

Gary
Received on Tuesday, 28 November 2000 12:38:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:44 GMT