3

I'm trying to create an xhtml file from an html file, but i'm facing an error. During conversion i get the following error:

line 1 column 1 - Warning: inserting missing 'title' element

InputStream: Document content looks like HTML 2.0

1 warning, no errors were found!

my code is the following:

Tidy tidy = new Tidy(); //HTML parser and pretty printer. 
tidy.setXHTML(true); //true if tidy should output XHTML   
tidy.parse(fin, fout);

At the end i receive an empty file. What am i doing wrong?

Sincerely, Zoli

Community
  • 1
  • 1
Zoltan Varadi
  • 2,468
  • 2
  • 34
  • 51

1 Answers1

2

Try to force the output like the following, and it will return the forced result. tidy.setForceOutput(true).

changer
  • 51
  • 2