W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2000

Re: Difference in DOM's

From: Lauren Wood <lauren@sqwest.bc.ca>
Date: Fri, 1 Sep 2000 09:19:56 -0700
To: "'www-dom@w3.org'" <www-dom@w3.org>
Message-ID: <39AF74BC.20542.CEC13@localhost>
On 1 Sep 2000, at 11:28, Mark Brennan wrote:

> Say we have two different implementations of the org.w3c.dom one being
> openXML's and another being some other package out there.  Now when we parse
> an HTML file and produce a DOM out of it we are not assured that the two DOM
> representations will have the same structured tree because of differences in
> parsing and malformed html.  Wasn't the whole idea of the DOM to keep things
> structured.  shouldn't these two parsers create the exact same DOM? 

If the HTML is valid, you will get the same trees. Given the number 
of ways HTML can be invalid, there's no way of specifying the DOM 
to make all processors give you the same trees under any 
circumstances. So you'll have to clean up the HTML first, e.g., by 
running it through an HTML clean-up script.

Received on Friday, 1 September 2000 12:18:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:07 UTC