http://geek.sylvainw.com/2010/03/28/using-notepad-to-quickly-format-xml/

My favorite way to quickly format a given chunk of XML is to use Notepad++ and the XML Tools plugin.  You can get Notepad++ here.  And the XML Tools plugin is here(you’ll have to wait a few seconds before the download starts).

Installing Notepad

(the following instructions are based on Notepad++ v5.9.4 and my differ in later versions)

1) Choose your language:

2) Click Next:

3) Agree to the License Agreement:

4) Choose where you want to install the files:

5) Choose what options you want to install (I simply use the defaults):

6) Choose the final set of options.  I check the first one because I like having applications keep their data in their own installation directory:

7) Click Install:

8) Click Finish and you’re done!

Settings In Notepad++

There are a few settings that I always set that (I find) make life more convenient (but that’s just me).

Under Settings | Preferences:

On the “General” tab, I check “Show close button on each tab”.

On the “MISC.” tab, I uncheck “Remember current session for next launch” because I always want Notepad++ to open with a new blank document.

Installing the XML Tools

If you run Notepad++ and look in the Plugins menu, you’ll see that the XML Tools aren’t there:

1) Download the XML tools from here.

2) Unzip the file and copy the XMLTools.dll to the Notepad++ plugins folder (in the example above: C:\Program Files (x86)\Notepad++\plugins):

3) Re-start Notepad++ and you should now see the XMLTools appear in the Plugins menu:

When you click on “How to use…” you’ll get the following:

4) I’ve just tried (2011/10/20) following those links and the first one doesn’t work and the 2nd one just takes you to a directory listing. So, I’ve uploaded the zip file to my site and you can download the missing lib files from here.

5) Unzip the ext_libs.zip file and then copy the unzipped DLLs to the Notepad++ installation directory (in the example above: C:\Program Files (x86)\Notepad++):

6) Re-start Notepad++ and you should finally see the proper XML Tools menu:

The feature I use the most is “Pretty print (XML only – with line breaks)”.  This will format any piece of XML with all the proper line spacing.

Start with:

After doing Ctrl+Alt+Shift+B:

Sweet!

Using Notepad++ To Quickly Format XML的更多相关文章

  1. eclipse的格式化规则(即format.xml文件).

    eclipse的格式化规则(即format.xml文件) 下面是文件内容 <?xml version="1.0" encoding="UTF-8" sta ...

  2. Make Notepad++ auto close HTML/XML tags after the slash(the Dreamweaver way)

    I've been looking for a Notepad++ plugin that can close HTML/XML tags after a slash just like the wa ...

  3. eclipse format xml

    eclipse版本信息:Version: Luna Release (4.4.0) eclipse默认使用Tab缩进,显得不是那么专业. 因为不同的系统对Tab的支持是不一样的,所以在不同的系统或者编 ...

  4. 通过notepad++将混乱的xml配置的格式进行美化

    需求描述: 最近在进行hbase配置文件的修改之后,发现xml文件的格式很不美观, 然后,在网上找了些方法,实测,通过notepad++的xml tools插件就可 达到美化效果. 操作过程: 1.以 ...

  5. Notepad++安装xml插件

    环境: win7 64位 Notepad++7.3.3 原生的Notepad++不自带xml文件的插件,所以在显示xml文件时并不分行(如下图所示),对于用户编辑,查看的操作而言,并不友好,所以需要安 ...

  6. WP8解析XML格式文件

    DOTA2 WebAPI请求返回的格式有两种,一种是XML,一种是JSON,默认是返回JSON格式,如果要返回XML格式的话,需要在加上format=xml. 这里举一个简单的解析XML格式的例子(更 ...

  7. Notepad++编写Markdown

    Markdown语法高亮 下载userDefineLang_markdown.xml 打开Notepad++的 Language 菜单,选中底部的 Define your language... 在 ...

  8. XML编码utf-8有中文无法解析或乱码 C#

    XML的encoding="UTF-8" ,含有中文的话(部分)会出现乱码. 网上还是很多这类问题跟解决办法的. 表现为用ie或者infopath之类的xml软件打不开这个xml, ...

  9. c# json TO xml

    using System.IO;using System.Text;using System.Xml.Serialization;using System.Xml;using System.Runti ...

随机推荐

  1. 06-hibernate注解-一对多单向外键关联

    一对多单向外键 1,一方持有多方的集合,一个班级有多个学生(一对多). 2,@OneToMany(cascade={CascadeType.ALL}, fetch=FetchType.LAZY ) / ...

  2. iOS 移动端生成工具开发

    代码地址如下:http://www.demodashi.com/demo/11284.html 一.准备工作 编译环境 xcode 用于生成冗余架构代码, 实现生成零耦合架构 二.程序实现 上个月的一 ...

  3. jenkins部署前端node项目实例

    Jenkins 分发文件用到rsync命令   在 /etc/passwd中 修改 jenkins 为 /bin/bash jenkins:x:494:494:Jenkins Automation S ...

  4. mac 使用apache开启https功能,实现ios局域网内测(一)

    笔者尝试了网上各种办法最后还是找到了方法解决了一系列局域网内测的问题,随手做个笔记记录下,亲测可行. 一.先生成证书 1.进入apache web 的根目录处理证书命令 cd /Library/Web ...

  5. SqlServer报错:System.Data.SqlClient.SqlException

    在将Asp.Net MVC4项目部署到新机器上进行调试的时候,出现了如下错误: System.Data.SqlClient.SqlException 具体的内容如下: System.Data.SqlC ...

  6. NoReverseMatch at /salesman/zhuce/ Reverse for '/zhuce/' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []

    NoReverseMatch at /salesman/zhuce/ Reverse for '/zhuce/' with arguments '()' and keyword arguments ' ...

  7. [Yii Framework] Share the session with memcache in Yii

    When developing distributed applications with Yii, naturally, we will face that we have to share the ...

  8. Impala中多列转为一行

    之前有一位朋友咨询我,Impala中怎样实现将多列转为一行,事实上Impala中自带函数能够实现,不用自己定义函数. 以下我開始演示: -bash-4.1$ impala-shell Starting ...

  9. oracle 12c grid db 安装的的checklist

    oracle 12c 安装 checklist 关闭 iptables NetworkManager selinux service iptables stop chkconfig iptables ...

  10. Java序列化与反序列化学习(一)

    一.序列化与反序列化概述     当两个进程在进行远程通信时,彼此可以发送各种类型的数据.无论是何种类型的数据,都会以二进制序列的形式在网络上传送.发送方需要把这个Java对象转换为字节序列,才能在网 ...