Re: Tidy and removing attributes

"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 UTC