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 
news:3qa3n1tigcmuq8lo4hcfcahvc5t1svbsco@hive.bjoern.hoehrmann.de...
>
> * 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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:55 GMT