Re: question about Tidy

Chunbo Shao wrote:
> 
> Hi, Gary
> 
> I am TRULY glad you still remember me. You are so kind. I think we
> will definitely have a chance to talk in the future. May be very soon,
> maybe within this year. Or even face to face ? I hope I can say thanks to
> you directly like that.
> 
> You exactly hit the point of my question.
> 
> I have some knowledge of interface and implements in java. I am still not
> clear enough about my question in last email to you. Because when I see
> inside of the source code of Tidy.java, the return type of parseDOM()
> is org.w3c.dom.Document, which is not org.w3c.tidy.DOMNodeImpl.
> 
> I know dom.Document extends dom.Node, which means dom.Document is a
> dom.Node. And I also know tidy.DOMNodeImpl implements dom.Node.......I am
> totally confused with all these "cross" relations. (because the
> implementation of the methods in dom.Node interface is in tidy.DOMNodeImpl
> class.)
> 
> Help me.

Yes.  This is very confusing.  DOMDocumentImpl extends DOMNodeImpl (and
implements org.w3c.dom.Document).  So a DOMDocumentImpl is a Document as
well as a Node.  To really sort this out for yourself, you should take
each of the classes in the JTidy source and create a simple class
diagram that will show you the inheritance relationships of each of the
classes.

> 
> By the way, what is the difference between tidy.Node and dom.Node?
> 

These are two completely different classes.

Gary

Received on Tuesday, 13 February 2001 02:08:10 UTC