W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2004

RE: JTidy removing attributes when tidying up a HTML page

From: <ref11+@pitt.edu>
Date: Thu, 08 Jan 2004 10:46:48 -0500 (EST)
To: Dirk Weigenand <Dirk.Weigenand@smb-tec.com>, html-tidy@w3.org
Message-id: <01L55J9ZO330010NVO@mb1i1.ns.pitt.edu>

I don't know about removing the id attributes. 

However as far as I know, if the document object is the a result of the jtidy you can't get an element by using getElementById(). This is because getElementById is a DOM level 2 function. While jtidy only supports DOM level 1 function. More info check the org.w3c.dom.Document in the API documentation.

You should be able to however iterate through all attributes (unless you also use a DOM level 2 function to iterate through the attribute). 

--- Begin Orginal Message ---
From: "Dirk Weigenand" <Dirk.Weigenand@smb-tec.com>
To:   <html-tidy@w3.org>
Date: 1/8/2004 1:54:00 PM


i already tried on the jtidy mailing list on sourceforge but have got no
response so far. So i'm reposting my question on this list:

I'm using JTidy in conjunction with HTTPUnit for some web testing.

When i get the DOM from HTTPUnit (WebConversation.getCurrentPage().getDOM())
and then look up an Element by id (either by document.getElementById() or via
iterating over the DOM and inspecting the attributes of each element) all id
attributes are removed.

Is this something one can change via a configuration option or can give me
someone a hint as to the deeper reasons behind this problem?

Dirk Weigenand                      mailto:Dirk.Weigenand@smb-tec.com
SMB GmbH                                       http://www.smb-tec.com

Reza Ferrydiansyah
SHRS University of Pittsburgh
Received on Thursday, 8 January 2004 10:47:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:54 UTC