Mahmood javadzadeh
Mahmood javadzadeh

Reputation: 23

Do you have any function or tools to convert simple html to special code which I like?

I want to convert a simple code to an special code which I like. see this simple code :

<html>
    <body>
         <a href="stack.com"> The content of the document </a> 
    </body>
</html>

convert to :

<html>\n\t<body>\n\t\t <a href=\"stack.com\"> The content of the document </a> \n\t</body>\n</html>

(convert linebreak to \n ; convert tabs to \t ; convert " to \") And finally put them in one line. just one line. Can you suggest me a good function or tools for this work?

Upvotes: 2

Views: 32

Answers (1)

Batu.Khan
Batu.Khan

Reputation: 3065

First to come into mind is Notepad++ for me.

In Macro menu

  1. You can start recording your actions
  2. Replace all linebreaks with \n
  3. Replace all tabs with \t
  4. Replace all " with \"
  5. And save your macro to use whenever you want to use again

Upvotes: 2

Related Questions