信息发布→ 登录 注册 退出

notepad++如何把混乱的xml格式化

发布时间:2019-08-06

点击量:

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

操作过程:(推荐学习:notepad++)

1.以下为原xml文件的格式效果

hbase.rootdirfile:///root/hbase-data/hbase
hbase.cluster.distributedtrue
hbase.zookeeper.quorum
redhat6,standby,hadoop3
hbase.zookeeper.property.dataDir/opt/hbase-1.3.0/tmp/zk/data
hbase.regionserver.wal.codecorg.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec
hbase.region.server.rpc.scheduler.factory.classorg.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory
Factory to create the Phoenix RPC Scheduler that uses separate queues for index and metadata updates

hbase.rpc.controllerfactory.classorg.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory
Factory to create the Phoenix RPC Scheduler that uses separate queues for index and metadata updates

备注:发现很不美观。

2.将以上内容放入一个文档中,点击notepad++工具顶部上的"插件(P)"->“XML Tools”->"pretty print(XML only -with line breaks)"

修改后效果如下:



hbase.rootdir
file:///root/hbase-data/hbase


hbase.cluster.distributed
true


hbase.zookeeper.quorum
redhat6,standby,hadoop3


hbase.zookeeper.property.dataDir
/opt/hbase-1.3.0/tmp/zk/data


hbase.regionserver.wal.codec
org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec


hbase.region.server.rpc.scheduler.factory.class
org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory
Factory to create the Phoenix RPC Scheduler that uses separate queues for index and metadata updates


hbase.rpc.controllerfactory.class
org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory
Factory to create the Phoenix RPC Scheduler that uses separate queues for index and metadata updates


注意:如果notepad++不存在XML Tools插件,需要自行进行插件的下载和安装。

标签:# notepad  # 很不  # 不存在  # 找了  # 就可  # 配置文件  # 操作过程  # 在网上  # 文档  # quorum  # img  
在线客服
服务热线

服务热线

4008888355

微信咨询
二维码
返回顶部
×二维码

截屏,微信识别二维码

打开微信

微信号已复制,请打开微信添加咨询详情!