translate a HTML document into a XHTML document

Discussion in 'Java' started by mike, Jan 23, 2005.

  1. mike

    mike Guest

    regards:

    Is it possible to use
    java api
    javax.swing.text.html.parser
    to translate a HTML document into a XHTML document?
    @@.

    thank you
    may god be with you
     
    mike, Jan 23, 2005
    #1
    1. Advertisements

  2. On Sun, 23 Jan 2005 08:53:42 -0800, mike wrote:

    > regards:
    >
    > Is it possible to use
    > java api
    > javax.swing.text.html.parser
    > to translate a HTML document into a XHTML document?
    > @@.


    I guess it _is_ possible. But i really doubt there is a toXHTML() method
    in there somewhere, so some work will be necessary.

    --
    In pioneer days they used oxen for heavy pulling, and when one ox
    couldn't budge a log, they didn't try to grow a larger ox. We shouldn't
    be trying for bigger computers, but for more systems of computers.
    --- Rear Admiral Grace Murray Hopper
     
    Stefan Schulz, Jan 23, 2005
    #2
    1. Advertisements

  3. mike

    thufir Guest

    Stefan Schulz wrote:
    [..]
    > I guess it _is_ possible. But i really doubt there is a toXHTML()

    method
    > in there somewhere, so some work will be necessary.

    [..]

    Found it @ <http://jtidy.sourceforge.net/> :)


    --
    Thufir Hawat
     
    thufir, Jan 24, 2005
    #3
  4. mike wrote:
    > Is it possible to use
    > java api
    > javax.swing.text.html.parser
    > to translate a HTML document into a XHTML document?


    No, not in general, because javax.swing.text.html.parser is very limited
    (for details, follow the link in my sig). Consider using a tool like JTidy.

    /Thomas

    --
    The comp.lang.java.gui FAQ:
    ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
     
    Thomas Weidenfeller, Jan 24, 2005
    #4
    1. Advertisements

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. darrel
    Replies:
    1
    Views:
    447
    Lamont Adams
    Sep 9, 2004
  2. mike
    Replies:
    2
    Views:
    653
    Chris Smith
    Jan 14, 2005
  3. Spam Survivor
    Replies:
    3
    Views:
    635
    Nick Kew
    Sep 15, 2003
  4. mike
    Replies:
    6
    Views:
    1,581
    Andy Dingley
    Oct 14, 2004
  5. A.Hanemann
    Replies:
    4
    Views:
    591
    Gerald Aichholzer
    Aug 23, 2005
  6. Ion Freeman
    Replies:
    17
    Views:
    1,086
    Tom Anderson
    Jul 11, 2009
  7. xhtml champs
    Replies:
    0
    Views:
    736
    xhtml champs
    Aug 1, 2011
  8. xhtml champs
    Replies:
    0
    Views:
    1,216
    xhtml champs
    Aug 2, 2011
Loading...