Menu

Can htmlparser convert html to xhtml ?

Help
conan chan
2003-12-21
2013-04-27
  • conan chan

    conan chan - 2003-12-21

    Can htmlparser convert html to xhtml just like jtidy?

     
    • mikeliu1976

      mikeliu1976 - 2004-11-04

      regards:

      I think HTML-to-XHTML operation needs
      some efforts to use HTMLparser as a tool.
      You may download Jtidy as another choice.

      Thank you.
      May god bless you all.

       
    • mikeliu1976

      mikeliu1976 - 2004-11-07

      regards:

      I want to know the codes,too.

      May god bless you

       
    • mikeliu1976

      mikeliu1976 - 2004-11-17

      regards:
        
         From  http://webpageworkshop.co.uk/main/xhtml_converting
         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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.