Re: Tidy deleting valid tags

"Andre Rubin" <[email protected]>
Newsgroups gmane.comp.web.html-tidy.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.