A Jtidy question

M

mike

I use Jtidy (api) to translate a HTML file into a "XHTML file".
But The "XHTML file" cannot be identified by nokia 6600.
Do I miss something important?
Or this is Jtidy's weakness or bug?




followings are my codes.
first I import the api.
You know,:),and then.

---------------------------------------------------------
import org.w3c.tidy.Tidy;

Tidy tidy = new Tidy();
tidy.setCharEncoding(4);
// tidy.setXmlTags(false);
System.out.println("tidy test");
//at input not XML
//tidy.setQuiet(true);
//tidy.setShowWarnings(true);
//tidy.setXmlOut(false);

tidy.setXHTML(true);
FileInputStream pw2 = new FileInputStream("page.txt");
FileOutputStream pw3 = new FileOutputStream("page2.txt");
tidy.parse(pw2,pw3);
pw2.close();
pw3.close();
---------------------------------------------------------


page.txt is HTML document input.
page2.txt is XHTML document output.
but my nokia6600 cannot identify the page2.txt.
Did I miss something important?
thank you.
best wishes
 
J

John C. Bollinger

mike said:
I use Jtidy (api) to translate a HTML file into a "XHTML file".
But The "XHTML file" cannot be identified by nokia 6600.
Do I miss something important?
Or this is Jtidy's weakness or bug?

Didn't you ask the same question about a Nokia 6800 a week or two ago?
The answer then was that the Nokia software only understands a subset of
XHTML. Very likely the same is true of the 6600. You will need a
special-purpose tool to strip the XHTML output of JTidy to the subset
understood by the Nokia software. Nokia might offer such a thing;
otherwise you would have to write one yourself. Do note that such a
transformation will necessarily alter or remove some of the markup in
the page.


John Bollinger
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top