From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (71-38-157-25.ptld.qwest.net [71.38.157.25]) by hurricane.the-brannons.com (Postfix) with ESMTPSA id 8D1D777ADA for ; Fri, 14 Aug 2015 13:13:45 -0700 (PDT) From: Chris Brannon To: Edbrowse-dev@lists.the-brannons.com References: <20150713234537.eklhad@comcast.net> Date: Fri, 14 Aug 2015 13:17:21 -0700 In-Reply-To: <20150713234537.eklhad@comcast.net> (Karl Dahlke's message of "Thu, 13 Aug 2015 23:45:37 -0400") Message-ID: <87mvxt62we.fsf@mushroom.localdomain> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Edbrowse-dev] tidy5 X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2015 20:13:45 -0000 Karl Dahlke writes: > Forgive me I haven't looked at the code at all, > but I would guess there's a tidy5 encodeTags() that takes the > html text and makes the tree. Essentially true. The details are a bit more complicated, but this is the idea. We call tidy to parse the html, and we get back a structure from tidy called a document. It contains our tree of nodes, and we can iterate over it. The problem is, this is a usable parse tree for the html, but it isn't a true DOM. We can remove nodes and attributes from the tree, but we can't add them. That causes problems for JS that needs to add new nodes. So we're going to have to take that parse tree we get back from Tidy5, build our own DOM out of it, and eventually render it. -- Chris