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

Re: Tidy deleting valid tags

From: Andre Rubin <andre.rubin@gmail.com>
Date: Fri, 29 Jun 2007 13:57:09 -0700
Message-ID: <efd1bd310706291357p3d070b6ap7f3a2e3788f79b73@mail.gmail.com>
To: html-tidy@w3.org
Sorry!  Email was sent before I finish it!

Hi,

The original html contains the following tags:

....
  <ul>
    <li>...</li>
  </ul>

  <div class="a and b"></div>
  <div class="a" style="height:4px"></div>
  <div class="c">
  <p class="d"><span class="e">*</span> My text </p>
....

After I parse it with the following code:


Tidy tidy = new Tidy();
tidy.setXHTML(true);

//print
tidy.parse(inputStream, System.out);

This is the result:

  <ul>
    <li>...</li>
  </ul>
  <div class="c">
   <p class="d"><span class="e">*</span> My text </p>

Is there a way to prevent tidy to delete those empty div tags?

Thanks for the help,

Andre
Received on Saturday, 30 June 2007 18:52:39 GMT

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