W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2010

Re: Modifying an html file using tidy tool

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 30 Jun 2010 12:16:17 +0200
To: venqy <rao.emandi@gmail.com>
Cc: html-tidy@w3.org
Message-ID: <u56m2612uaocq1n0ih38dpnk5fmn5lu9u6@hive.bjoern.hoehrmann.de>
* venqy wrote:
>I have been exploring html tidy(command line tool) for modifying html pages,
>i had picked the html souce from the website www.slate.com, when i tried to
>modify this webpage using the command tidy.exe -f err.txt -m slate.html  i
>had noticed that its not being modified.
>
>Also i do see the same behavior when i pick the code from
>www.huffingtonpost.com and try to modify using the tidy tool, the html page
>is not being modified
>
>I had tried with some other sites and it worked out well, wanted to know why
>tidy is unable to modify the hmtl code that i had copied from slate.com
>site, can anyone reply back. Is it so that tidy will modify only some sort
>of html files not all.  http://old.nabble.com/file/p29021579/Slate.html
>Slate.html  http://old.nabble.com/file/p29021579/Huffing.html Huffing.html 

HTML Tidy will not modify a document when it encountered "errors" while
trying to parse the document unless you force Tidy to, as doing so might
corrupt the document. In your case the document uses elements that Tidy
is not familiar with, such as "fb:recommendations". If you do not care
that the document might end up corrupted, you can use the configuration
option `force-output` to force Tidy to modify the document.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Wednesday, 30 June 2010 10:44:46 GMT

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