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

Re: Tidy and removing attributes

From: Christopher Woods <cwoods_eol@yahoo.com>
Date: Wed, 9 Nov 2005 10:33:35 -0500
To: html-tidy@w3.org
Message-ID: <dkt4sg$ve7$1@sea.gmane.org>

"Bjoern Hoehrmann" <derhoermi@gmx.net> wrote in message 
> * EL-HAID Nabil wrote:
>><body bgcolor="FFFFFF" bgsound="toto.wav"> ..... </body>
>>and the output.xml should look like this :
>><body> ..... </body>
>>my question is: how can i use Tidy to reach my goal??
> There is --drop-proprietary-attributes; if that does not help, you'll
> have to make e.g. a XSLT document that removes the attributes you want
> to have removed.

You can use the TidyAPIs to load/clean the source document and then iterate 
over the document tree outputing the nodes (elements) and text data content. 
This would give you complete control over which (if any) attributes you want 
to output.
Received on Wednesday, 9 November 2005 15:41:19 UTC

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