A Jtidy question

Discussion in 'Java' started by mike, Oct 26, 2004.

  1. mike

    mike Guest

    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
     
    mike, Oct 26, 2004
    #1
    1. Advertising

  2. mike wrote:

    > 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
     
    John C. Bollinger, Oct 27, 2004
    #2
    1. Advertising

  3. mike

    mike Guest

    regards


    thanks for your reply.
    now I am a little understood.



    thank you
    best wishes
     
    mike, Oct 28, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mike

    USE OF JTIDY SYSTEM!!

    mike, May 5, 2004, in forum: Java
    Replies:
    0
    Views:
    374
  2. mike
    Replies:
    0
    Views:
    491
  3. mike
    Replies:
    1
    Views:
    454
  4. mike
    Replies:
    2
    Views:
    468
  5. mike

    A Jtidy question

    mike, Oct 27, 2004, in forum: Java
    Replies:
    0
    Views:
    489
Loading...

Share This Page