Formatting XML and JSON using Sublime Text

來源:互聯網
上載者:User

標籤:from   hang   manager   images   -o   mat   missing   note   try   

Formatting XML and JSON using Sublime Text

Last week I was trying to make some changes to my WCF service and had to deal with some XML data. The problem was the XML was not nicely formatted and I had to highlight couple of missing pieces of information. Normally I would use Notepad++ but I though let‘s try doing it in?"Sublime Text".

If you are new to this editor you can read my?this?post which describes the basic steps to get started with Sublime Text. As a web developer we often have to deal with non formatted XML and JSON data. Sublime Text has a plugin?Indext XML?that you can use to format XML and JSON data. The plug-in is available in both ST2 & ST3.

Installing Plug-in

Open the editor and hit?Ctrl+Shift+P?to open?Command Palette.

Type"Install Package" and hit?Enter. Type?Indent XML.

Select the highlighted plug-in and click Enter. You should see the message that saying the plug-in has been installed successfully.

Restart the editor. At least I had to.

Formatting XML

Copy the non formatted XML

Hit?Ctrl + K + F.

You can also do it from the Menu option.

Formatting JSON

Hit?Ctrl + K + F.

You can also do it from the Menu option.

That‘s it for today. Happy Formatting !

Formatting XML and JSON using Sublime Text

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.