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

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.