HTML convert to XHTML

Discussion in 'Java' started by mike, Nov 17, 2004.

  1. mike

    mike Guest


    A HTML document can be converted to XHTML document.
    By the following Steps:

    Step 1: Convert elements to lowercase
    Step 2: Replace the !DOCTYPE declaration
    Step 3: Change the <html> tag
    Step 4: Make sure all elements are closed
    Step 5: Ensure all attributes are quoted
    Step 6: 'Un-minimize' minimized attributes
    Step 7: Make sure that every image has an 'alt' attribute
    Step 8: Check for 'overlapping' elements
    Step 9: Check 'type' attributes for script and style elements
    Step 10: Validate your code!

    Could I achieve the above 10 steps by using HTMLparer?
    Welcome to see your opinions.

    Or maybe I may try another api like JDOM?

    thank you
    May god be with you
    mike, Nov 17, 2004
    1. Advertisements

  2. Sounds more like you want JTidy. Google for it.

    Thomas Weidenfeller, Nov 17, 2004
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.